From 686606ead1fef695d864c2f8f3cfe925299a03de Mon Sep 17 00:00:00 2001 From: Madoura Date: Mon, 28 Nov 2022 00:22:41 -0600 Subject: [PATCH] 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 --- pkgs/development/libraries/composable_kernel/default.nix | 4 ++-- pkgs/development/libraries/rocwmma/default.nix | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/composable_kernel/default.nix b/pkgs/development/libraries/composable_kernel/default.nix index 882aa1a918d9..8ce90c5f0ae5 100644 --- a/pkgs/development/libraries/composable_kernel/default.nix +++ b/pkgs/development/libraries/composable_kernel/default.nix @@ -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}" ]; diff --git a/pkgs/development/libraries/rocwmma/default.nix b/pkgs/development/libraries/rocwmma/default.nix index a2312f73654b..8e66f9cf1327 100644 --- a/pkgs/development/libraries/rocwmma/default.nix +++ b/pkgs/development/libraries/rocwmma/default.nix @@ -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"