[libc-commits] [clang] [libc] [llvm] [libc] Add support to build and run libc tests with spirv backend (PR #208129)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Sun Jul 12 11:32:58 PDT 2026
================
@@ -224,12 +225,22 @@ int main(int argc, const char **argv, const char **envp) {
case ELF::EM_CUDA:
Backend = OL_PLATFORM_BACKEND_CUDA;
break;
+ case ELF::EM_INTELGT:
+ Backend = OL_PLATFORM_BACKEND_LEVEL_ZERO;
+ break;
default:
handleError(createStringError(
"unhandled ELF architecture: %s",
ELF::convertEMachineToArchName(ElfOrErr->getHeader().e_machine)
.data()));
}
+ } else if (Magic == file_magic::spirv_object) {
----------------
jhuber6 wrote:
I'm not sure we should keep this case, it's assuming that only Intel handles SPIR-V. The default logic is that it will check all devices and execute on the first it finds, this logic is an optimization to save initialization overhead (on machines like mine with CUDA and ROCm both).
https://github.com/llvm/llvm-project/pull/208129
More information about the libc-commits
mailing list