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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user