[llvm] [Offload] Fix APU detection for MI300 testing (PR #143026)
Joseph Huber via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 5 12:56:54 PDT 2025
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/143026
Summary:
We have this check when the target is MI300 but it fails if this
environment variable isn't set. Set a default value of '0' if not
present so that will be converted to bool false.
>From 23b4aa3ab85adb39412b95b743cc370fff8e7499 Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Thu, 5 Jun 2025 14:53:17 -0500
Subject: [PATCH] [Offload] Fix APU detection for MI300 testing
Summary:
We have this check when the target is MI300 but it fails if this
environment variable isn't set. Set a default value of '0' if not
present so that will be converted to bool false.
---
offload/test/lit.cfg | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/offload/test/lit.cfg b/offload/test/lit.cfg
index 0725b56f0f05d..df57be293138c 100644
--- a/offload/test/lit.cfg
+++ b/offload/test/lit.cfg
@@ -36,8 +36,7 @@ if 'HSA_ENABLE_SDMA' in os.environ:
# Architectures like gfx942 may or may not be APUs so an additional environment
# variable is required as some tests can be APU specific.
-if 'IS_APU' in os.environ:
- config.environment['IS_APU'] = os.environ['IS_APU']
+config.environment['IS_APU'] = os.environ.get('IS_APU', '0')
# set default environment variables for test
if 'CHECK_OPENMP_ENV' in os.environ:
More information about the llvm-commits
mailing list