rocm-related: use empty list instead of null for gpuTargets

composable_kernel: use empty list instead of null for gpuTargets

rocwmma: use empty list instead of null for gpuTargets
This commit is contained in:
Madoura
2022-11-28 02:25:55 -06:00
parent d54ee59ff5
commit 686606ead1
2 changed files with 4 additions and 4 deletions
@@ -8,7 +8,7 @@
, gtest ? null
, buildTests ? false
, buildExamples ? false
, gpuTargets ? null # gpuTargets = [ "gfx803" "gfx900" "gfx1030" ... ]
, gpuTargets ? [ ] # gpuTargets = [ "gfx803" "gfx900" "gfx1030" ... ]
}:
assert buildTests -> gtest != null;
@@ -54,7 +54,7 @@ stdenv.mkDerivation (finalAttrs: {
cmakeFlags = [
"-DCMAKE_C_COMPILER=hipcc"
"-DCMAKE_CXX_COMPILER=hipcc"
] ++ lib.optionals (gpuTargets != null) [
] ++ lib.optionals (gpuTargets != [ ]) [
"-DGPU_TARGETS=${lib.strings.concatStringsSep ";" gpuTargets}"
];
@@ -15,7 +15,7 @@
, buildDocs ? true
, buildTests ? false
, buildSamples ? false
, gpuTargets ? null # gpuTargets = [ "gfx908:xnack-" "gfx90a:xnack-" "gfx90a:xnack+" ... ]
, gpuTargets ? [ ] # gpuTargets = [ "gfx908:xnack-" "gfx90a:xnack-" "gfx90a:xnack+" ... ]
}:
assert buildTests -> gtest != null;
@@ -98,7 +98,7 @@ in stdenv.mkDerivation (finalAttrs: {
"-DCMAKE_INSTALL_BINDIR=bin"
"-DCMAKE_INSTALL_LIBDIR=lib"
"-DCMAKE_INSTALL_INCLUDEDIR=include"
] ++ lib.optionals (gpuTargets != null) [
] ++ lib.optionals (gpuTargets != [ ]) [
"-DGPU_TARGETS=${lib.strings.concatStringsSep ";" gpuTargets}"
] ++ lib.optionals buildTests [
"-DROCWMMA_BUILD_VALIDATION_TESTS=ON"