1{ lib, makeImpureTest, clinfo, rocm-opencl-icd, rocm-smi }:
2makeImpureTest {
3 name = "rocm-opencl";
4 testedPackage = "rocm-opencl-icd";
5
6 nativeBuildInputs = [ clinfo rocm-smi ];
7
8 OCL_ICD_VENDORS = "${rocm-opencl-icd}/etc/OpenCL/vendors/";
9
10 testScript = ''
11 # Test fails if the number of platforms is 0
12 clinfo | grep -E 'Number of platforms * [1-9]'
13 rocm-smi | grep -A1 GPU
14 '';
15
16 meta = with lib; {
17 maintainers = teams.rocm.members;
18 };
19}