cudaPackages.tensorrt-samples.passthru.testers: properly guard bf16 and dla testers

Signed-off-by: Connor Baker <ConnorBaker01@gmail.com>
This commit is contained in:
Connor Baker
2026-01-15 20:34:10 +00:00
parent 99885ce012
commit f01183a9d1
8 changed files with 42 additions and 34 deletions
@@ -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"}"
@@ -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"}"
@@ -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"}"
@@ -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"}"
@@ -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"
];
}
)
@@ -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"}"
@@ -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"}"
@@ -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"}"