Loading pkgs/development/libraries/rocm-opencl-icd/default.nix +3 −1 Original line number Diff line number Diff line { lib, stdenv, rocm-opencl-runtime }: { lib, callPackage, stdenv, rocm-opencl-runtime }: stdenv.mkDerivation rec { pname = "rocm-opencl-icd"; Loading @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { echo "${rocm-opencl-runtime}/lib/libamdocl64.so" > $out/etc/OpenCL/vendors/amdocl64.icd ''; passthru.impureTests = { rocm-opencl = callPackage ./test.nix {}; }; meta = with lib; { description = "OpenCL ICD definition for AMD GPUs using the ROCm stack"; license = licenses.mit; Loading pkgs/development/libraries/rocm-opencl-icd/test.nix 0 → 100644 +19 −0 Original line number Diff line number Diff line { lib, makeImpureTest, clinfo, rocm-opencl-icd, rocm-smi }: makeImpureTest { name = "rocm-opencl"; testedPackage = "rocm-opencl-icd"; nativeBuildInputs = [ clinfo rocm-smi ]; OCL_ICD_VENDORS = "${rocm-opencl-icd}/etc/OpenCL/vendors/"; testScript = '' # Test fails if the number of platforms is 0 clinfo | grep -E 'Number of platforms * [1-9]' rocm-smi | grep -A1 GPU ''; meta = with lib; { maintainers = teams.rocm.members; }; } Loading
pkgs/development/libraries/rocm-opencl-icd/default.nix +3 −1 Original line number Diff line number Diff line { lib, stdenv, rocm-opencl-runtime }: { lib, callPackage, stdenv, rocm-opencl-runtime }: stdenv.mkDerivation rec { pname = "rocm-opencl-icd"; Loading @@ -11,6 +11,8 @@ stdenv.mkDerivation rec { echo "${rocm-opencl-runtime}/lib/libamdocl64.so" > $out/etc/OpenCL/vendors/amdocl64.icd ''; passthru.impureTests = { rocm-opencl = callPackage ./test.nix {}; }; meta = with lib; { description = "OpenCL ICD definition for AMD GPUs using the ROCm stack"; license = licenses.mit; Loading
pkgs/development/libraries/rocm-opencl-icd/test.nix 0 → 100644 +19 −0 Original line number Diff line number Diff line { lib, makeImpureTest, clinfo, rocm-opencl-icd, rocm-smi }: makeImpureTest { name = "rocm-opencl"; testedPackage = "rocm-opencl-icd"; nativeBuildInputs = [ clinfo rocm-smi ]; OCL_ICD_VENDORS = "${rocm-opencl-icd}/etc/OpenCL/vendors/"; testScript = '' # Test fails if the number of platforms is 0 clinfo | grep -E 'Number of platforms * [1-9]' rocm-smi | grep -A1 GPU ''; meta = with lib; { maintainers = teams.rocm.members; }; }