SWDEV-557828 - fix hip-tests on cuda (#1152)

Co-authored-by: Rahul Manocha <rmanocha@amd.com>
This commit is contained in:
Rahul Manocha
2025-10-07 08:28:56 -07:00
کامیت شده توسط GitHub
والد f578f39f0a
کامیت 27ec19116d
13فایلهای تغییر یافته به همراه331 افزوده شده و 332 حذف شده
@@ -29,7 +29,11 @@ THE SOFTWARE.
static std::vector<char> compile_using_hiprtc(const std::string& code, std::string gpu_arch) {
hiprtcProgram prog;
HIPRTC_CHECK(hiprtcCreateProgram(&prog, code.c_str(), "code.cu", 0, NULL, NULL));
std::string offload_arch = "--offload-arch=" + gpu_arch;
#ifdef __HIP_PLATFORM_AMD__
std::string offload_arch = "--offload-arch=" + gpu_arch;
#else
std::string offload_arch = "--fmad=false";
#endif
const char* opts[] = {offload_arch.c_str()};
HIPRTC_CHECK(hiprtcCompileProgram(prog, 1, opts));
size_t size;