MCPcopy Create free account
hub / github.com/ROCm/clr / getCOMGRLanguage

Function getCOMGRLanguage

rocclr/device/devprogram.cpp:205–226  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

203}
204
205static amd_comgr_language_t getCOMGRLanguage(bool isHIP, const amd::option::Options& amdOptions) {
206 if (isHIP) {
207 return AMD_COMGR_LANGUAGE_HIP;
208 } else {
209 const char* clStd = amdOptions.oVariables->CLStd;
210 uint clcStd = (clStd[2] - '0') * 100 + (clStd[4] - '0') * 10;
211
212 switch (clcStd) {
213 case 100:
214 case 110:
215 case 120:
216 return AMD_COMGR_LANGUAGE_OPENCL_1_2;
217 case 200:
218 return AMD_COMGR_LANGUAGE_OPENCL_2_0;
219 default:
220 break;
221 }
222 }
223
224 DevLogPrintfError("Cannot set Language version for %s \n", amdOptions.oVariables->CLStd);
225 return AMD_COMGR_LANGUAGE_NONE;
226}
227
228
229amd_comgr_status_t Program::createAction(const amd_comgr_language_t oclver,

Callers 2

linkLLVMBitcodeMethod · 0.85
compileToLLVMBitcodeMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected