Bot should only make the GPU available in containers for native builds
While debugging an issue for a GROMACS CUDA build, I noticed that the Grace builds always expose the GPU to the build container, even when we're cross-compiling (e.g. compiling for compute capability 7.0): the bot/build.sh script currently only checks if a GPU is available on the machine, and then makes it available in the container, see https://github.com/EESSI/software-layer-scripts/blob/main/bot/build.sh#L275. That does not make sense, as it may start running GPU tests with binaries built for another CC. It could very well have been the reason for the weird GROMACS test failures. The bot should already know if we're cross-compiling or not, as can also be seen in its Github comments: ``` Building on: nvidia-grace and accelerator nvidia/cc90 Building for: aarch64/nvidia/grace and accelerator nvidia/cc90 Building on: nvidia-grace Building for: aarch64/nvidia/grace and accelerator nvidia/cc70 ``` It could make that information available to the job, e.g. in job.cfg, allowing the build script to use that information and to decide whether or not the GPU should be made available in the container.
issue