diff --git a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_algorithm_selector.nix b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_algorithm_selector.nix index 047b0e6a5121..87815642a701 100644 --- a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_algorithm_selector.nix +++ b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_algorithm_selector.nix @@ -1,4 +1,5 @@ { + atLeast, backendStdenv, lib, mkTester, @@ -26,15 +27,16 @@ lib.optionalAttrs (older "10.8") ( "--datadir=${sample-data.outPath + "/mnist"}" "--fp16" ]; - + } + // lib.optionalAttrs (atLeast "10") { bf16 = mkTester "sample_algorithm_selector-bf16" [ "sample_algorithm_selector" "--datadir=${sample-data.outPath + "/mnist"}" "--bf16" ]; } - # Only Orin has a DLA - // lib.optionalAttrs (lib.elem "8.7" backendStdenv.cudaCapabilities) { + # Only Xavier and Orin have a DLA + // lib.optionalAttrs (lib.subtractLists [ "7.2" "8.7" ] backendStdenv.cudaCapabilities == [ ]) { dla = mkTester "sample_algorithm_selector-dla" [ "sample_algorithm_selector" "--datadir=${sample-data.outPath + "/mnist"}" diff --git a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_dynamic_reshape.nix b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_dynamic_reshape.nix index e68c51ccb3df..6094b16011f8 100644 --- a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_dynamic_reshape.nix +++ b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_dynamic_reshape.nix @@ -1,4 +1,6 @@ { + atLeast, + lib, mkTester, sample-data, ... @@ -21,7 +23,8 @@ "--datadir=${sample-data.outPath + "/mnist"}" "--fp16" ]; - +} +// lib.optionalAttrs (atLeast "10") { bf16 = mkTester "sample_dynamic_reshape-bf16" [ "sample_dynamic_reshape" "--datadir=${sample-data.outPath + "/mnist"}" diff --git a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_int8_api.nix b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_int8_api.nix index 58faf35a48fc..3ca3a46bacc2 100644 --- a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_int8_api.nix +++ b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_int8_api.nix @@ -12,8 +12,8 @@ "--data=${sample-data.outPath + "/int8_api"}" ]; } -# Only Orin has a DLA -// lib.optionalAttrs (lib.elem "8.7" backendStdenv.cudaCapabilities) { +# Only Xavier and Orin have a DLA +// lib.optionalAttrs (lib.subtractLists [ "7.2" "8.7" ] backendStdenv.cudaCapabilities == [ ]) { dla = mkTester "sample_int8_api-dla" [ "sample_int8_api" "--model=${sample-data.outPath + "/resnet50/ResNet50.onnx"}" diff --git a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_io_formats.nix b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_io_formats.nix index 208966cd2640..c8ec26241fdb 100644 --- a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_io_formats.nix +++ b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_io_formats.nix @@ -11,8 +11,8 @@ "--datadir=${sample-data.outPath + "/mnist"}" ]; } -# Only Orin has a DLA -// lib.optionalAttrs (lib.elem "8.7" backendStdenv.cudaCapabilities) { +# Only Xavier and Orin have a DLA +// lib.optionalAttrs (lib.subtractLists [ "7.2" "8.7" ] backendStdenv.cudaCapabilities == [ ]) { dla = mkTester "sample_io_formats-dla" [ "sample_io_formats" "--datadir=${sample-data.outPath + "/mnist"}" diff --git a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_non_zero_plugin.nix b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_non_zero_plugin.nix index 8e97fdf3c99c..5b43347d7c05 100644 --- a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_non_zero_plugin.nix +++ b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_non_zero_plugin.nix @@ -1,27 +1,28 @@ { atLeast, - finalAttrs, lib, mkTester, sample-data, ... }: -{ - default = mkTester "sample_non_zero_plugin" [ - "sample_non_zero_plugin" - "--datadir=${sample-data.outPath + "/mnist"}" - ]; +lib.optionalAttrs (atLeast "10") ( + { + default = mkTester "sample_non_zero_plugin" [ + "sample_non_zero_plugin" + "--datadir=${sample-data.outPath + "/mnist"}" + ]; - fp16 = mkTester "sample_non_zero_plugin-fp16" [ - "sample_non_zero_plugin" - "--datadir=${sample-data.outPath + "/mnist"}" - "--fp16" - ]; -} -// lib.optionalAttrs (atLeast "10.0.1") { - columnOrder = mkTester "sample_non_zero_plugin-columnOrder" [ - "sample_non_zero_plugin" - "--datadir=${sample-data.outPath + "/mnist"}" - "--columnOrder" - ]; -} + fp16 = mkTester "sample_non_zero_plugin-fp16" [ + "sample_non_zero_plugin" + "--datadir=${sample-data.outPath + "/mnist"}" + "--fp16" + ]; + } + // lib.optionalAttrs (atLeast "10.0.1") { + columnOrder = mkTester "sample_non_zero_plugin-columnOrder" [ + "sample_non_zero_plugin" + "--datadir=${sample-data.outPath + "/mnist"}" + "--columnOrder" + ]; + } +) diff --git a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_onnx_mnist.nix b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_onnx_mnist.nix index 1895b87d47e5..bd2791eb4d8f 100644 --- a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_onnx_mnist.nix +++ b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_onnx_mnist.nix @@ -1,4 +1,5 @@ { + atLeast, backendStdenv, lib, mkTester, @@ -22,15 +23,16 @@ "--datadir=${sample-data.outPath + "/mnist"}" "--fp16" ]; - +} +// lib.optionalAttrs (atLeast "10") { bf16 = mkTester "sample_onnx_mnist-bf16" [ "sample_onnx_mnist" "--datadir=${sample-data.outPath + "/mnist"}" "--bf16" ]; } -# Only Orin has a DLA -// lib.optionalAttrs (lib.elem "8.7" backendStdenv.cudaCapabilities) { +# Only Xavier and Orin have a DLA +// lib.optionalAttrs (lib.subtractLists [ "7.2" "8.7" ] backendStdenv.cudaCapabilities == [ ]) { dla = mkTester "sample_onnx_mnist-dla" [ "sample_onnx_mnist" "--datadir=${sample-data.outPath + "/mnist"}" diff --git a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_onnx_mnist_coord_conv_ac.nix b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_onnx_mnist_coord_conv_ac.nix index ef4b4bedfbc0..25260050b501 100644 --- a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_onnx_mnist_coord_conv_ac.nix +++ b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_onnx_mnist_coord_conv_ac.nix @@ -25,8 +25,8 @@ lib.optionalAttrs false ( "--fp16" ]; } - # Only Orin has a DLA - // lib.optionalAttrs (lib.elem "8.7" backendStdenv.cudaCapabilities) { + # Only Xavier and Orin have a DLA + // lib.optionalAttrs (lib.subtractLists [ "7.2" "8.7" ] backendStdenv.cudaCapabilities == [ ]) { dla = mkTester "sample_onnx_mnist_coord_conv_ac-dla" [ "sample_onnx_mnist_coord_conv_ac" "--datadir=${sample-data.outPath + "/mnist"}" diff --git a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_progress_monitor.nix b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_progress_monitor.nix index 86254b3039d4..55866b2e5b48 100644 --- a/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_progress_monitor.nix +++ b/pkgs/development/cuda-modules/packages/tensorrt-samples/testers/sample_progress_monitor.nix @@ -25,8 +25,8 @@ lib.optionalAttrs false ( "--fp16" ]; } - # Only Orin has a DLA - // lib.optionalAttrs (lib.elem "8.7" backendStdenv.cudaCapabilities) { + # Only Xavier and Orin have a DLA + // lib.optionalAttrs (lib.subtractLists [ "7.2" "8.7" ] backendStdenv.cudaCapabilities == [ ]) { dla = mkTester "sample_progress_monitor-dla" [ "sample_progress_monitor" "--datadir=${sample-data.outPath + "/mnist"}"