SWDEV-551218 - Fix hip on nvidia build failures (#642)

* Rebase and address merge conflicts

* SWDEV-551218 - Fix hip on nvidia build failures
Этот коммит содержится в:
Satyanvesh Dittakavi
2025-08-26 23:40:35 +05:30
коммит произвёл GitHub
родитель 96a46962ad
Коммит 09cfa97156
+4 -6
Просмотреть файл
@@ -2060,9 +2060,11 @@ inline static hipError_t hipMemPrefetchAsync_v2(const void* dev_ptr, size_t coun
inline static hipError_t hipMemAdvise_v2(const void* dev_ptr, size_t count, hipMemoryAdvise advice,
hipMemLocation location) {
#if CUDA_VERSION >= 13000
return hipCUDAErrorTohipError(cudaMemAdvise(dev_ptr, count, advice, location));
return hipCUDAErrorTohipError(cudaMemAdvise(dev_ptr, count,
hipMemoryAdviseTocudaMemoryAdvise(advice), location));
#else
return hipCUDAErrorTohipError(cudaMemAdvise_v2(dev_ptr, count, advice, location));
return hipCUDAErrorTohipError(cudaMemAdvise_v2(dev_ptr, count,
hipMemoryAdviseTocudaMemoryAdvise(advice), location));
#endif
}
@@ -2169,10 +2171,6 @@ inline static hipError_t hipSetDevice(int device) {
return hipCUDAErrorTohipError(cudaSetDevice(device));
}
inline static hipError_t hipSetValidDevices(int* device_arr, int len) {
return hipCUDAErrorTohipError(cudaSetValidDevices(device_arr, len));
}
inline static hipError_t hipChooseDevice(int* device, const hipDeviceProp_t* prop) {
if (prop == NULL) {
return hipErrorInvalidValue;