Unverified Commit 4f3546d6 authored by Luna Nova's avatar Luna Nova
Browse files

rocmPackages.clr: add impureTest that runs openctl-cts test_basic

Replacement for AMD app samples opencl tests
parent b0d9a5a5
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -263,11 +263,15 @@ stdenv.mkDerivation (finalAttrs: {
    };

    impureTests = {
      # bash $(nix-build -A rocmPackages.clr.impureTests.rocm-smi)
      rocm-smi = callPackage ./test-rocm-smi.nix {
        inherit rocm-smi;
        clr = finalAttrs.finalPackage;
      };
      # TODO(@LunNova): add OpenCL test with opencl-cts
      # Simple subset of opencl-cts test_basic
      opencl-cts = callPackage ./test-opencl-cts.nix {
        clr = finalAttrs.finalPackage;
      };
      generic-arch = callPackage ./test-isa-compat.nix {
        clr = finalAttrs.finalPackage;
        name = "generic-arch";
+28 −0
Original line number Diff line number Diff line
{
  lib,
  makeImpureTest,
  opencl-cts,
  clr,
}:

makeImpureTest {
  name = "opencl-cts";
  testedPackage = "rocmPackages.clr";

  sandboxPaths = [
    "/sys"
    "/dev/dri"
    "/dev/kfd"
  ];

  nativeBuildInputs = [ opencl-cts ];
  OCL_ICD_VENDORS = "${clr.icd}/etc/OpenCL/vendors";

  testScript = ''
    test_basic arraycopy arrayreadwrite astype barrier vector_swizzle work_item_functions
  '';

  meta = {
    teams = [ lib.teams.rocm ];
  };
}