SWDEV-2 - Fix hiprtcCompileProgram

- hiprtcCompileProgram should create isa with temp name when
  program name is not provided along with --save-temps option

Change-Id: I47974e2ac56336c851531622ff7d2a3ffb53455e


[ROCm/clr commit: 958b97b433]
This commit is contained in:
Satyanvesh Dittakavi
2022-07-22 13:46:02 +00:00
rodzic 67f9e52ffb
commit 3b1e9dc52f
3 zmienionych plików z 40 dodań i 3 usunięć
@@ -86,7 +86,12 @@ hiprtcResult hiprtcCreateProgram(hiprtcProgram* prog, const char* src, const cha
HIPRTC_RETURN(HIPRTC_ERROR_PROGRAM_CREATION_FAILURE);
}
if (!rtcProgram->addSource(std::string(src), std::string("CompileSource"))) {
if (name == nullptr || strlen(name) == 0) {
progName = "CompileSourceXXXXXX";
hiprtc::helpers::GenerateUniqueFileName(progName);
}
if (!rtcProgram->addSource(std::string(src), progName)) {
delete rtcProgram;
HIPRTC_RETURN(HIPRTC_ERROR_INVALID_INPUT);
}