* [PATCH] [gdb/testsuite] Fix device index in gdb.rocm/addr-bp-gpu-no-deb-info.exp
@ 2025-10-30 9:54 Luis Machado
2025-10-30 14:51 ` [PATCH] " Lancelot SIX
0 siblings, 1 reply; 3+ messages in thread
From: Luis Machado @ 2025-10-30 9:54 UTC (permalink / raw)
To: gdb-patches; +Cc: Luis Machado
On a system with a single GPU, I spotted this test failing. The environment
variable ROCR_VISIBLE_DEVICES can be a bit misleading, as it actually expects
a list of device id's as opposed to a literal number of devices to make
visible.
This test sets it to 1, which is the second GPU on the system. As a result,
systems with a single GPU will have no visible GPU's and the test will FAIL.
Set ROCR_VISIBLE_DEVICES to 0 to make use of the first GPU on the system.
---
gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp b/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp
index be459673dc9..2719f0d8b13 100644
--- a/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp
+++ b/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp
@@ -28,9 +28,10 @@ if {[build_executable "failed to prepare" $testfile $srcfile {hip}]} {
clean_restart $::testfile
-# We may have multiple GPUs, resulting in many possible locations. This is
-# needed to ensure we get a single address to break on.
-gdb_test_no_output "set environment ROCR_VISIBLE_DEVICES=1"
+# We may have multiple GPUs, resulting in many possible locations. This is
+# needed to ensure we get a single address to break on, so make device 0 the
+# only visible one.
+gdb_test_no_output "set environment ROCR_VISIBLE_DEVICES=0"
# Make the HIP runtime load all the GPU code objects during initialization.
gdb_test_no_output "set environment HIP_ENABLE_DEFERRED_LOADING=0"
--
2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix device index in gdb.rocm/addr-bp-gpu-no-deb-info.exp
2025-10-30 9:54 [PATCH] [gdb/testsuite] Fix device index in gdb.rocm/addr-bp-gpu-no-deb-info.exp Luis Machado
@ 2025-10-30 14:51 ` Lancelot SIX
2025-10-30 15:13 ` Machado, Luis
0 siblings, 1 reply; 3+ messages in thread
From: Lancelot SIX @ 2025-10-30 14:51 UTC (permalink / raw)
To: Luis Machado, gdb-patches
On Thu, Oct 30, 2025 at 09:54:04AM +0000, Luis Machado wrote:
> On a system with a single GPU, I spotted this test failing. The environment
> variable ROCR_VISIBLE_DEVICES can be a bit misleading, as it actually expects
> a list of device id's as opposed to a literal number of devices to make
> visible.
>
> This test sets it to 1, which is the second GPU on the system. As a result,
> systems with a single GPU will have no visible GPU's and the test will FAIL.
>
> Set ROCR_VISIBLE_DEVICES to 0 to make use of the first GPU on the system.
>
This looks good to me, thanks for fixing this.
Approvid-by: Lancelot Six <lancelot.six@amd.com> (AMDGPU)
Best,
Lancelot.
> ---
> gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp b/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp
> index be459673dc9..2719f0d8b13 100644
> --- a/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp
> +++ b/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp
> @@ -28,9 +28,10 @@ if {[build_executable "failed to prepare" $testfile $srcfile {hip}]} {
>
> clean_restart $::testfile
>
> -# We may have multiple GPUs, resulting in many possible locations. This is
> -# needed to ensure we get a single address to break on.
> -gdb_test_no_output "set environment ROCR_VISIBLE_DEVICES=1"
> +# We may have multiple GPUs, resulting in many possible locations. This is
> +# needed to ensure we get a single address to break on, so make device 0 the
> +# only visible one.
> +gdb_test_no_output "set environment ROCR_VISIBLE_DEVICES=0"
>
> # Make the HIP runtime load all the GPU code objects during initialization.
> gdb_test_no_output "set environment HIP_ENABLE_DEFERRED_LOADING=0"
> --
> 2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] Fix device index in gdb.rocm/addr-bp-gpu-no-deb-info.exp
2025-10-30 14:51 ` [PATCH] " Lancelot SIX
@ 2025-10-30 15:13 ` Machado, Luis
0 siblings, 0 replies; 3+ messages in thread
From: Machado, Luis @ 2025-10-30 15:13 UTC (permalink / raw)
To: Six, Lancelot, gdb-patches
Thanks. Pushed now.
________________________________________
From: Six, Lancelot <Lancelot.Six@amd.com>
Sent: Thursday, 30 October 2025 14:51
To: Machado, Luis; gdb-patches@sourceware.org
Subject: Re: [PATCH] Fix device index in gdb.rocm/addr-bp-gpu-no-deb-info.exp
On Thu, Oct 30, 2025 at 09:54:04AM +0000, Luis Machado wrote:
> On a system with a single GPU, I spotted this test failing. The environment
> variable ROCR_VISIBLE_DEVICES can be a bit misleading, as it actually expects
> a list of device id's as opposed to a literal number of devices to make
> visible.
>
> This test sets it to 1, which is the second GPU on the system. As a result,
> systems with a single GPU will have no visible GPU's and the test will FAIL.
>
> Set ROCR_VISIBLE_DEVICES to 0 to make use of the first GPU on the system.
>
This looks good to me, thanks for fixing this.
Approvid-by: Lancelot Six <lancelot.six@amd.com> (AMDGPU)
Best,
Lancelot.
> ---
> gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp b/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp
> index be459673dc9..2719f0d8b13 100644
> --- a/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp
> +++ b/gdb/testsuite/gdb.rocm/addr-bp-gpu-no-deb-info.exp
> @@ -28,9 +28,10 @@ if {[build_executable "failed to prepare" $testfile $srcfile {hip}]} {
>
> clean_restart $::testfile
>
> -# We may have multiple GPUs, resulting in many possible locations. This is
> -# needed to ensure we get a single address to break on.
> -gdb_test_no_output "set environment ROCR_VISIBLE_DEVICES=1"
> +# We may have multiple GPUs, resulting in many possible locations. This is
> +# needed to ensure we get a single address to break on, so make device 0 the
> +# only visible one.
> +gdb_test_no_output "set environment ROCR_VISIBLE_DEVICES=0"
>
> # Make the HIP runtime load all the GPU code objects during initialization.
> gdb_test_no_output "set environment HIP_ENABLE_DEFERRED_LOADING=0"
> --
> 2.43.0
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-10-30 15:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-30 9:54 [PATCH] [gdb/testsuite] Fix device index in gdb.rocm/addr-bp-gpu-no-deb-info.exp Luis Machado
2025-10-30 14:51 ` [PATCH] " Lancelot SIX
2025-10-30 15:13 ` Machado, Luis
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox