From cfa247b511e171c181c9701d0b3e8dd824b82806 Mon Sep 17 00:00:00 2001 From: Wenju He Date: Tue, 27 Oct 2026 00:31:24 +0100 Subject: [PATCH] [Driver][SYCL] Pass arl_h to ocloc for intel_gpu_arl_h The driver translated intel_gpu_arl_h / intel_gpu_12_74_4 to "-device xe_lpgplus_b0" (since f51e43b2f061), which ocloc does not know (it has arl-h, arl-h-b0 and 12.74.4). ocloc 101.9150 fails with "Could not determine device target: xe_lpgplus_b0". Exposed now because AOT tests moved from spir64_gen -device arl-h, which bypassed this translation, to intel_gpu_ (#23441). The lit test only checks -### output, so it never ran ocloc on the name. Only ARL-H hits it: intel_gpu_bmg builds with the same ocloc, as do intel_gpu_arl_s,intel_gpu_arl_u. Pass arl_h instead (ocloc accepts '_' or '-'). Verified with ocloc 101.9150: intel_gpu_arl_h builds aot.cpp. CMPLRLLVM-79001 Co-Authored-By: Claude Sonnet 5.5 --- clang/lib/Driver/ToolChains/SYCL.cpp | 2 +- clang/test/Driver/sycl-oneapi-gpu-intelgpu.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/clang/lib/Driver/ToolChains/SYCL.cpp b/clang/lib/Driver/ToolChains/SYCL.cpp index f00a39aa8238a..94226077e75b9 100644 --- a/clang/lib/Driver/ToolChains/SYCL.cpp +++ b/clang/lib/Driver/ToolChains/SYCL.cpp @@ -1874,7 +1874,7 @@ llvm::opt::ArgStringList SYCLToolChain::getSPIRVCompilationOptions( .Cases({"pvc_vg", "12_61_7"}, "pvc_xt_c0_vg") .Cases({"mtl_u", "mtl_s", "arl_u", "arl_s", "12_70_4"}, "mtl_s") .Cases({"mtl_h", "12_71_4"}, "mtl_p") - .Cases({"arl_h", "12_74_4"}, "xe_lpgplus_b0") + .Cases({"arl_h", "12_74_4"}, "arl_h") .Default(DepInfo); CmdArgs.push_back("-device"); CmdArgs.push_back(Args.MakeArgString(DepInfo)); diff --git a/clang/test/Driver/sycl-oneapi-gpu-intelgpu.cpp b/clang/test/Driver/sycl-oneapi-gpu-intelgpu.cpp index 389e8571c4ba4..fc566fee0f4e7 100644 --- a/clang/test/Driver/sycl-oneapi-gpu-intelgpu.cpp +++ b/clang/test/Driver/sycl-oneapi-gpu-intelgpu.cpp @@ -146,9 +146,9 @@ // RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_12_71_4 -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE,MACRO -DDEV_STR=mtl_p -DMAC_STR=MTL_H // RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_arl_h -### %s 2>&1 | \ -// RUN: FileCheck %s --check-prefixes=DEVICE,MACRO -DDEV_STR=xe_lpgplus_b0 -DMAC_STR=ARL_H +// RUN: FileCheck %s --check-prefixes=DEVICE,MACRO -DDEV_STR=arl_h -DMAC_STR=ARL_H // RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_12_74_4 -### %s 2>&1 | \ -// RUN: FileCheck %s --check-prefixes=DEVICE,MACRO -DDEV_STR=xe_lpgplus_b0 -DMAC_STR=ARL_H +// RUN: FileCheck %s --check-prefixes=DEVICE,MACRO -DDEV_STR=arl_h -DMAC_STR=ARL_H // RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_bmg -### %s 2>&1 | \ // RUN: FileCheck %s --check-prefixes=DEVICE,MACRO -DDEV_STR=bmg -DMAC_STR=BMG // RUN: %clangxx -fsycl -fsycl-targets=intel_gpu_bmg_g21 -### %s 2>&1 | \