GPU Acceleration for AMD 7000 series GPUs on Ubuntu 22.04 and Windows 11 WSL2

sn2006gy

Well-known member
I built a new release of libtensorflow based on ROCm 6 which fixes some bugs in my prior release and allows GPU pass through from Windows WSL2.

Not quite native libtensorflow on windows yet, but the experience works rather well. Documented the process for Linux bare metal and WSL2



BTW, if you use Ubuntu 24.04 from the Windows Store and install your own registered version of pixinsight into Ubuntu Windows will create an icon for you so the experience feels pretty native!

1720029018088.png


Feel free to reply if you have any questions or issues here.

I'm still working towards support on Fedora and other instances (bare metal and WSL2 pass through)

The guide also has similar steps for getting it working with a bare metal Ubuntu 24.04 install.
 
Last edited:
Fancy doing one for the RX6600 lol. Tried this one in the slim hope it would work. Pocessing time on a star pack image of IC 1396 dropped from 13 minutes on Windows to 3:13 using ubuntu but i am not seeing any action with regards to memory change or the temp on the GPU in task manager.

Still it was well worth a shot for that big change alone

Ian
 
I've mostly been chasing down the updates for the 7000 series cards. I may have to do a ROCm 5.x build to target the 6000 series cards - i just don't have any to verify/test with :)
 
I can sort you out with a remote connection lol. Posted in the support forum about the difference in times. Seems to be down to Ubuntu making better use of the CPU and memory
 
Can you share how your PI install on WSL2 Ubuntu 22.04 went? I read it should launch on a fresh install without issue but I've tried multiple times and start with the same set of errors every time.

alex@13900K7900XTX:~/PI/PixInsight/bin$ ./PixInsight.sh
./PixInsight.sh: line 8: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8): No such file or directory
/home/alex/PI/PixInsight/bin/./PixInsight: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

After hours of troubleshooting I get it working but haven't had success with the AMD drivers with my 7900XTX. I've installed Ubuntu 22.04 LTS straight from the Microsoft Store and installed my own registered copy. Any thoughts on just getting PI up and running before I move forward with the GPU?
 
Can you share how your PI install on WSL2 Ubuntu 22.04 went? I read it should launch on a fresh install without issue but I've tried multiple times and start with the same set of errors every time.

alex@13900K7900XTX:~/PI/PixInsight/bin$ ./PixInsight.sh
./PixInsight.sh: line 8: warning: setlocale: LC_ALL: cannot change locale (en_US.utf8): No such file or directory
/home/alex/PI/PixInsight/bin/./PixInsight: error while loading shared libraries: libnss3.so: cannot open shared object file: No such file or directory

After hours of troubleshooting I get it working but haven't had success with the AMD drivers with my 7900XTX. I've installed Ubuntu 22.04 LTS straight from the Microsoft Store and installed my own registered copy. Any thoughts on just getting PI up and running before I move forward with the GPU?
I'm getting this same error. Hopefully someone with more experience than either of us can advixe.
 
I'm getting this same error. Hopefully someone with more experience than either of us can advixe.
I was able to resolve these errors today.

To clear up the setlocale error:
sudo dpkg-reconfigure locales
Select en_US.UTF-8 as the default

to clear the libnss3 error
sudo apt install libnss3 kde-plasma-desktop
I installed KDE as well, because after installing libnss3 my system complained about other missing libraries related to windowing systems.
-Chris
 
Tried this on my Radeon 6700XT but no luck. At first it printed message that it is ignoring GPU with gfx1031. I set
Code:
export HSA_OVERRIDE_GFX_VERSION=10.3.0
this time it started but it crashed soon after.

Code:
2024-11-17 18:40:59.363383: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.
To enable the following instructions: SSE3 SSE4.1 SSE4.2 AVX AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.
2024-11-17 18:40:59.388308: I external/local_xla/xla/stream_executor/rocm/rocm_executor.cc:920] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2024-11-17 18:40:59.426336: I external/local_xla/xla/stream_executor/rocm/rocm_executor.cc:920] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2024-11-17 18:40:59.426398: I external/local_xla/xla/stream_executor/rocm/rocm_executor.cc:920] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2024-11-17 18:40:59.426474: I external/local_xla/xla/stream_executor/rocm/rocm_executor.cc:920] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2024-11-17 18:40:59.426527: I external/local_xla/xla/stream_executor/rocm/rocm_executor.cc:920] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2024-11-17 18:40:59.426584: I external/local_xla/xla/stream_executor/rocm/rocm_executor.cc:920] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero
2024-11-17 18:40:59.426611: I tensorflow/core/common_runtime/gpu/gpu_device.cc:2021] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 11220 MB memory:  -> device: 0, name: AMD Radeon RX 6700 XT, pci bus id: 0000:0a:00.0
2024-11-17 18:41:00.232319: I tensorflow/compiler/mlir/mlir_graph_optimization_pass.cc:388] MLIR V1 optimization pass is not enabled
2024-11-17 18:41:02.060300: F ./tensorflow/core/kernels/conv_2d_gpu.h:708] Non-OK-status: GpuLaunchKernel( SwapDimension1And2InTensor3UsingTiles<T, NumThreads, TileLongSide, TileShortSide, conjugate>, total_tiles_count, NumThreads, 0, d.stream(), input, input_dims, output)
Status: INTERNAL: Cuda call failed with 98
Received signal 6
#0 0x756dbc624299 base::debug::CollectStackTrace()
#1 0x756dbc610daa base::debug::StackTrace::StackTrace()
#2 0x756dbc6233ca base::debug::(anonymous namespace)::StackDumpSignalHandler()
#3 0x756db4c45320 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x4531f)
#4 0x756db4c9eb1c pthread_kill
#5 0x756db4c4526e gsignal
#6 0x756db4c288ff abort
#7 0x756b73808b00 <unknown>
#8 0x756b73808b20 <unknown>
#9 0x756b6b7188bf <unknown>
#10 0x756b6b7488e6 <unknown>
#11 0x756b6b747f23 <unknown>
#12 0x756b6b6e1c56 <unknown>
#13 0x756b6b6d8d74 <unknown>
#14 0x756b6b6d86d0 <unknown>
#15 0x756b6b6d76b4 <unknown>
#16 0x756b667a349d <unknown>
#17 0x756b667a2c18 <unknown>
#18 0x756cbdb3d839 <unknown>
#19 0x756cbdc3d00d <unknown>
#20 0x756b737dda65 <unknown>
#21 0x756b737dd361 <unknown>
#22 0x756b7369e0da <unknown>
#23 0x756db4c9ca94 (/usr/lib/x86_64-linux-gnu/libc.so.6+0x9ca93)
#24 0x756db4d29c3c (/usr/lib/x86_64-linux-gnu/libc.so.6+0x129c3b)
  r8: 00007569340008e0  r9: 0000000000000007 r10: 0000000000000008 r11: 0000000000000246
 r12: 0000000000000006 r13: 0000000000000400 r14: 0000000000000016 r15: 0000756c31ffeb98
  di: 0000000000001351  si: 000000000000159d  bp: 0000756c31ffe830  bx: 000000000000159d
  dx: 0000000000000006  ax: 0000000000000000  cx: 0000756db4c9eb1c  sp: 0000756c31ffe7f0
  ip: 0000756db4c9eb1c efl: 0000000000000246 cgf: 002b000000000033 erf: 0000000000000000
 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000
[end of stack trace]
 
Last edited:
Back
Top