File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -344,8 +344,16 @@ amd_comgr_status_t COMGR::parseTargetIdentifier(StringRef IdentStr,
344344 Ident.Processor = Ident.Features [0 ];
345345 Ident.Features .erase (Ident.Features .begin ());
346346
347- size_t IsaIndex;
348347
348+ // TODO: Add a LIT test for this
349+ if (IdentStr == " amdgcn-amd-amdhsa--amdgcnspirv" ) {
350+ // Features not supported for SPIR-V
351+ if (!Ident.Features .empty ())
352+ return AMD_COMGR_STATUS_ERROR_INVALID_ARGUMENT;
353+ return AMD_COMGR_STATUS_SUCCESS;
354+ }
355+
356+ size_t IsaIndex;
349357 amd_comgr_status_t Status = metadata::getIsaIndex (IdentStr, IsaIndex);
350358 if (Status != AMD_COMGR_STATUS_SUCCESS) {
351359 return Status;
@@ -1017,6 +1025,10 @@ amd_comgr_status_t AMD_COMGR_API
10171025 return AMD_COMGR_STATUS_SUCCESS;
10181026 }
10191027
1028+ if (StringRef (IsaName) == " amdgcn-amd-amdhsa--amdgcnspirv" ) {
1029+ return ActionP->setIsaName (IsaName);
1030+ }
1031+
10201032 if (!metadata::isValidIsaName (IsaName)) {
10211033 return AMD_COMGR_STATUS_ERROR_INVALID_ARGUMENT;
10221034 }
You can’t perform that action at this time.
0 commit comments