[llvm] [offload] Add cuda to the PATH for nvptx tests (PR #208101)
Ivan R. Ivanov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 05:35:17 PDT 2026
https://github.com/ivanradanov updated https://github.com/llvm/llvm-project/pull/208101
>From db7d8fc96aa289b5b0f28ff9ee4bccd6a5d69170 Mon Sep 17 00:00:00 2001
From: Ivan Radanov Ivanov <iivanov at nvidia.com>
Date: Wed, 24 Jun 2026 15:35:24 -0700
Subject: [PATCH] [offload] Add cuda to the PATH for nvptx tests
When executing the JIT tests, ptxas needs to be in PATH. This also makes sure
we use ptxas from the same cuda path that we use when compiling.
---
offload/test/lit.cfg | 2 ++
1 file changed, 2 insertions(+)
diff --git a/offload/test/lit.cfg b/offload/test/lit.cfg
index 5fd7b97dd4216..03f3db08a2def 100644
--- a/offload/test/lit.cfg
+++ b/offload/test/lit.cfg
@@ -459,6 +459,8 @@ config.substitutions.append(("%target_triple", config.libomptarget_current_targe
config.substitutions.append(("%openmp_flags", config.test_openmp_flags))
if config.libomptarget_current_target.startswith('nvptx') and config.cuda_path:
config.substitutions.append(("%cuda_flags", "--cuda-path=" + config.cuda_path))
+ # JIT tests need ptxas in PATH
+ prepend_executable_path(f'{config.cuda_path}{os.path.sep}bin')
else:
config.substitutions.append(("%cuda_flags", ""))
config.substitutions.append(("%flags_clang", config.test_flags_clang))
More information about the llvm-commits
mailing list