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
This commit is contained in:
Satyanvesh Dittakavi
2022-07-22 13:46:02 +00:00
parent 0444d20e07
commit 958b97b433
3 changed files with 40 additions and 3 deletions
+6 -1
View File
@@ -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);
}