Revert "SWDEV-508982 - [6.4 Preview] - Handle hipMemPoolCreate, hipMemPoolDestory & hipDeviceSetMemPool during stream capture."
This reverts commit 57df1b348f.
Reason for revert: 6.4 Preview changes need not be merged to amd-staging as of now
Change-Id: I86452adfed14655f72d90440a486089743cc6587
Tá an tiomantas seo le fáil i:
@@ -59,11 +59,7 @@ hipError_t hipDeviceSetMemPool(int device, hipMemPool_t mem_pool) {
|
|||||||
if ((mem_pool == nullptr) || (device >= g_devices.size())) {
|
if ((mem_pool == nullptr) || (device >= g_devices.size())) {
|
||||||
HIP_RETURN(hipErrorInvalidValue);
|
HIP_RETURN(hipErrorInvalidValue);
|
||||||
}
|
}
|
||||||
if (DEBUG_HIP_7_PREVIEW & amd::CHANGE_HIP_STREAM_CAPTURE_API) {
|
|
||||||
if (!hip::tls.capture_streams_.empty() || !g_captureStreams.empty()) {
|
|
||||||
HIP_RETURN(hipErrorStreamCaptureUnsupported);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
auto poolDevice = reinterpret_cast<hip::MemoryPool*>(mem_pool)->Device();
|
auto poolDevice = reinterpret_cast<hip::MemoryPool*>(mem_pool)->Device();
|
||||||
if (poolDevice->deviceId() != device) {
|
if (poolDevice->deviceId() != device) {
|
||||||
HIP_RETURN(hipErrorInvalidDevice);
|
HIP_RETURN(hipErrorInvalidDevice);
|
||||||
@@ -332,11 +328,7 @@ hipError_t hipMemPoolCreate(hipMemPool_t* mem_pool, const hipMemPoolProps* pool_
|
|||||||
if (IS_WINDOWS && pool_props->handleTypes == hipMemHandleTypePosixFileDescriptor) {
|
if (IS_WINDOWS && pool_props->handleTypes == hipMemHandleTypePosixFileDescriptor) {
|
||||||
HIP_RETURN(hipErrorInvalidValue);
|
HIP_RETURN(hipErrorInvalidValue);
|
||||||
}
|
}
|
||||||
if (DEBUG_HIP_7_PREVIEW & amd::CHANGE_HIP_STREAM_CAPTURE_API) {
|
|
||||||
if (!hip::tls.capture_streams_.empty() || !g_captureStreams.empty()) {
|
|
||||||
HIP_RETURN(hipErrorStreamCaptureUnsupported);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
auto device = g_devices[pool_props->location.id];
|
auto device = g_devices[pool_props->location.id];
|
||||||
auto pool = new hip::MemoryPool(device, pool_props);
|
auto pool = new hip::MemoryPool(device, pool_props);
|
||||||
if (pool == nullptr) {
|
if (pool == nullptr) {
|
||||||
@@ -352,11 +344,6 @@ hipError_t hipMemPoolDestroy(hipMemPool_t mem_pool) {
|
|||||||
if (mem_pool == nullptr) {
|
if (mem_pool == nullptr) {
|
||||||
HIP_RETURN(hipErrorInvalidValue);
|
HIP_RETURN(hipErrorInvalidValue);
|
||||||
}
|
}
|
||||||
if (DEBUG_HIP_7_PREVIEW & amd::CHANGE_HIP_STREAM_CAPTURE_API) {
|
|
||||||
if (!hip::tls.capture_streams_.empty() || !g_captureStreams.empty()) {
|
|
||||||
HIP_RETURN(hipErrorStreamCaptureUnsupported);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
hip::MemoryPool* hip_mem_pool = reinterpret_cast<hip::MemoryPool*>(mem_pool);
|
hip::MemoryPool* hip_mem_pool = reinterpret_cast<hip::MemoryPool*>(mem_pool);
|
||||||
|
|
||||||
if (!IsMemPoolValid(hip_mem_pool)) {
|
if (!IsMemPoolValid(hip_mem_pool)) {
|
||||||
|
|||||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir