configs: Exit GPUFS script if DKMS module does not exist
The supported version of ROCm in GPUFS only supports the DKMS build of the amdgpu driver. However, since a gem5 user can potentially pass in any Linux kernel as a parameter, it is possible that the DKMS package for that kernel was not installed on the disk image. This would result in the simulation appearing to work when in reality it is just spinning waiting for commands from the driver. This check exits gem5 early in the simulation and outputs an error on the console to sanity check the correct driver is being used. Change-Id: I708912e5625e47eba15dcb2f722772a3b2928b98 Reviewed-on: https://gem5-review.googlesource.com/c/public/gem5/+/58129 Reviewed-by: Matt Sinclair <mattdsinclair@gmail.com> Maintainer: Matt Sinclair <mattdsinclair@gmail.com> Tested-by: kokoro <noreply+kokoro@google.com>
This commit is contained in:
@@ -49,6 +49,10 @@ export LD_LIBRARY_PATH=/opt/rocm/lib:$LD_LIBRARY_PATH
|
|||||||
export HSA_ENABLE_SDMA=0
|
export HSA_ENABLE_SDMA=0
|
||||||
dmesg -n8
|
dmesg -n8
|
||||||
dd if=/root/roms/vega10.rom of=/dev/mem bs=1k seek=768 count=128
|
dd if=/root/roms/vega10.rom of=/dev/mem bs=1k seek=768 count=128
|
||||||
|
if [ ! -f /lib/modules/`uname -r`/updates/dkms/amdgpu.ko ]; then
|
||||||
|
echo "ERROR: Missing DKMS package for kernel `uname -r`. Exiting gem5."
|
||||||
|
/sbin/m5 exit
|
||||||
|
fi
|
||||||
modprobe -v amdgpu ip_block_mask=0xff ppfeaturemask=0 dpm=0 audio=0
|
modprobe -v amdgpu ip_block_mask=0xff ppfeaturemask=0 dpm=0 audio=0
|
||||||
echo "Running {} {}"
|
echo "Running {} {}"
|
||||||
echo "{}" | base64 -d > myapp
|
echo "{}" | base64 -d > myapp
|
||||||
|
|||||||
Reference in New Issue
Block a user