SWDEV-438790 - Remove DEBUG_HIP_7_PREVIEW env var keeping the hipGetLastError changes by default (#337)

[ROCm/clr commit: 664bf232dd]
This commit is contained in:
Dittakavi, Satyanvesh
2025-05-21 22:12:45 +05:30
gecommit door GitHub
bovenliggende 834d770ca4
commit 1cc35da9be
3 gewijzigde bestanden met toevoegingen van 2 en 19 verwijderingen
@@ -157,13 +157,11 @@ const char* ihipGetErrorName(hipError_t hip_error);
hipError_t hip_error = ConvertCLErrorIntoHIPError(amd::Device::GetGPUError()); \
hip::tls.last_error_ = hip_error; \
hip::tls.last_command_error_ = hip_error; \
} else if (DEBUG_HIP_7_PREVIEW & amd::CHANGE_HIP_GET_LAST_ERROR) { \
} else { \
if (hip::tls.last_command_error_ != hipSuccess && \
hip::tls.last_command_error_ != hipErrorNotReady) { \
hip::tls.last_error_ = hip::tls.last_command_error_; \
} \
} else { \
hip::tls.last_error_ = hip::tls.last_command_error_; \
} \
HIPPrintDuration(amd::LOG_INFO, amd::LOG_API, &startTimeUs, "%s: Returned %s : %s", __func__, \
hip::ihipGetErrorName(hip::tls.last_command_error_), \
@@ -176,13 +174,11 @@ const char* ihipGetErrorName(hipError_t hip_error);
hipError_t hip_error = ConvertCLErrorIntoHIPError(amd::Device::GetGPUError()); \
hip::tls.last_error_ = hip_error; \
hip::tls.last_command_error_ = hip_error; \
} else if (DEBUG_HIP_7_PREVIEW & amd::CHANGE_HIP_GET_LAST_ERROR) { \
} else { \
if (hip::tls.last_command_error_ != hipSuccess && \
hip::tls.last_command_error_ != hipErrorNotReady) { \
hip::tls.last_error_ = hip::tls.last_command_error_; \
} \
} else { \
hip::tls.last_error_ = hip::tls.last_command_error_; \
} \
HIP_ERROR_PRINT(hip::tls.last_command_error_, __VA_ARGS__) \
return hip::tls.last_command_error_;
@@ -69,16 +69,6 @@ enum LogMask {
LOG_ALWAYS = -1 //!< (0xFFFFFFFF) Log always even mask flag is zero
};
// Flags to support backward incompatible changes before 7.0
enum BreakingHipChange7 {
CHANGE_HIP_GET_LAST_ERROR = 1 << 0, //!< (0x1) HIP_GET_LAST_ERROR
CHANGE_HIP_POINTER_GET_ATTRIBUTES = 1 << 1, //!< (0x2) HIP_POINTER_GET_ATTRIBUTES
CHANGE_HIP_LAUNCH_KERNEL = 1 << 2, //!< (0x4) HIP_LAUNCH_KERNEL
CHANGE_HIP_MODULE_LOAD = 1 << 3, //!< (0x8) HIP_MODULE_LOAD
CHANGE_HIP_TEXTURE_API = 1 << 4, //!< (0x10) HIP_TEXTURE_API
CHANGE_HIP_STREAM_CAPTURE_API = 1 << 5, //!< (0x20) HIP_STREAM_CAPTURE_API
};
//! \brief log file output
extern FILE* outFile;
@@ -273,9 +273,6 @@ release(bool, DEBUG_CLR_SKIP_RELEASE_SCOPE, false, \
"Forces release scope to SCOPE_NONE for aql packets") \
release(bool, DEBUG_HIP_DYNAMIC_QUEUES, false, \
"Forces dynamic queue management") \
release(uint, DEBUG_HIP_7_PREVIEW, 0, \
"Enables specific backward incompatible changes support before 7.0," \
"using the mask. By default the changes are disabled and is set to 0")\
release(uint, HIP_SKIP_ABORT_ON_GPU_ERROR, false, \
"Set this to true, to avoid host side abort for GPU errors") \
release(bool, HIP_FORCE_SPIRV_CODEOBJECT, false, \