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,
344
344
Ident.Processor = Ident.Features [0 ];
345
345
Ident.Features .erase (Ident.Features .begin ());
346
346
347
- size_t IsaIndex;
348
347
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;
349
357
amd_comgr_status_t Status = metadata::getIsaIndex (IdentStr, IsaIndex);
350
358
if (Status != AMD_COMGR_STATUS_SUCCESS) {
351
359
return Status;
@@ -1017,6 +1025,10 @@ amd_comgr_status_t AMD_COMGR_API
1017
1025
return AMD_COMGR_STATUS_SUCCESS;
1018
1026
}
1019
1027
1028
+ if (StringRef (IsaName) == " amdgcn-amd-amdhsa--amdgcnspirv" ) {
1029
+ return ActionP->setIsaName (IsaName);
1030
+ }
1031
+
1020
1032
if (!metadata::isValidIsaName (IsaName)) {
1021
1033
return AMD_COMGR_STATUS_ERROR_INVALID_ARGUMENT;
1022
1034
}
You can’t perform that action at this time.
0 commit comments