llvmorg-github-actions[bot] wrote:

<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-driver

Author: Srividya Sundaram (srividya-sundaram)

<details>
<summary>Changes</summary>

Disable the tool timeout in `sycl-system-arch.cpp`.

The `sycl-system-arch.cpp` test added in 
https://github.com/llvm/llvm-project/pull/229248 is failing on macOS pre-merge 
CI, e.g. 
https://github.com/llvm/llvm-project/actions/runs/41635790012/job/125916586515.

The test runs a fake `offload-arch` script, and clang waits at most 60 seconds 
for it. On the macOS CI machines, running such a script is very slow: the 
existing `nvptx-cuda-system-arch.c` and `openmp-system-arch.c` tests, which do 
the same, already take 3 to 4 minutes there. Since 
https://github.com/llvm/llvm-project/pull/229248 landed, this test failed with 
"Child timed out" in 29 of the 53 macOS runs that ran the clang tests.

This PR runs the test with `CLANG_TOOLCHAIN_PROGRAM_TIMEOUT=0`, so that clang 
waits for the fake tool without a limit.


---
Full diff: https://github.com/llvm/llvm-project/pull/238500.diff


1 Files Affected:

- (modified) clang/test/Driver/sycl-system-arch.cpp (+9-2) 


``````````diff
diff --git a/clang/test/Driver/sycl-system-arch.cpp 
b/clang/test/Driver/sycl-system-arch.cpp
index b5c86ab760f04..fd129fac744f9 100644
--- a/clang/test/Driver/sycl-system-arch.cpp
+++ b/clang/test/Driver/sycl-system-arch.cpp
@@ -8,9 +8,15 @@
 // RUN: chmod +x %t/offload_arch_sm_70_gfx906_gfx90a_xe_pvc
 // RUN: chmod +x %t/offload_arch_sm_70_gfx90a
 
+/// By default, clang waits at most 60 seconds for offload-arch, and on a slow
+/// machine even starting the fake one can take longer. Set
+/// CLANG_TOOLCHAIN_PROGRAM_TIMEOUT=0 so that clang waits for it without a
+/// limit.
+
 /// For SYCL offloading, --offload-arch=native asks offload-arch for Intel GPUs
 /// only.
-// RUN: %clang -ccc-print-phases --target=x86_64-unknown-linux-gnu -fsycl \
+// RUN: env CLANG_TOOLCHAIN_PROGRAM_TIMEOUT=0 \
+// RUN:   %clang -ccc-print-phases --target=x86_64-unknown-linux-gnu -fsycl \
 // RUN:   --offload-arch=native 
--offload-arch-tool=%t/offload_arch_sm_70_gfx906_gfx90a_xe_pvc \
 // RUN:   -c %s 2>&1 | FileCheck %s
 // CHECK-NOT: "device-sycl ({{amdgpu|nvptx}}
@@ -19,7 +25,8 @@
 
 /// Without an Intel GPU, SYCL reports that no GPU was found, as HIP and CUDA
 /// do.
-// RUN: not %clang -### --target=x86_64-unknown-linux-gnu -fsycl \
+// RUN: env CLANG_TOOLCHAIN_PROGRAM_TIMEOUT=0 \
+// RUN:   not %clang -### --target=x86_64-unknown-linux-gnu -fsycl \
 // RUN:   --offload-arch=native 
--offload-arch-tool=%t/offload_arch_sm_70_gfx90a \
 // RUN:   -c %s 2>&1 | FileCheck -check-prefix=NO-GPU %s
 // NO-GPU: error: cannot determine sycl architecture: No GPU detected in the 
system

``````````

</details>


https://github.com/llvm/llvm-project/pull/238500
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to