From 71af41abb5452a793af0f38bb343b99f566fc835 Mon Sep 17 00:00:00 2001 From: Adarsh321123 Date: Tue, 6 Aug 2024 22:25:19 -0700 Subject: [PATCH 1/2] fix build and nd run issues on ubuntu --- lakefile.lean | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/lakefile.lean b/lakefile.lean index bfb8bf4..857a06a 100644 --- a/lakefile.lean +++ b/lakefile.lean @@ -205,17 +205,12 @@ target libopenblas pkg : FilePath := do def getCt2CmakeFlags : IO (Array String) := do - let mut flags := #["-DBUILD_CLI=OFF", "-DOPENMP_RUNTIME=NONE", "-DWITH_DNNL=OFF", "-DWITH_MKL=OFF"] + let mut flags := #["-DOPENMP_RUNTIME=NONE", "-DWITH_MKL=OFF"] match getOS! with | .macos => flags := flags ++ #["-DWITH_ACCELERATE=ON", "-DWITH_OPENBLAS=OFF"] | .linux => flags := flags ++ #["-DWITH_ACCELERATE=OFF", "-DWITH_OPENBLAS=ON", "-DOPENBLAS_INCLUDE_DIR=../../OpenBLAS", "-DOPENBLAS_LIBRARY=../../OpenBLAS/libopenblas.so"] - if ← useCUDA then - flags := flags ++ #["-DWITH_CUDA=ON", "-DWITH_CUDNN=ON"] - else - flags := flags ++ #["-DWITH_CUDA=OFF", "-DWITH_CUDNN=OFF"] - return flags From f0e416dc19463dcd8a248b777242e85c187f4703 Mon Sep 17 00:00:00 2001 From: psong Date: Tue, 13 Aug 2024 22:42:38 -0700 Subject: [PATCH 2/2] minor: add todo marking temporary fix for cuda-enabled ubuntu --- lakefile.lean | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/lakefile.lean b/lakefile.lean index 857a06a..7d5ef1d 100644 --- a/lakefile.lean +++ b/lakefile.lean @@ -211,6 +211,12 @@ def getCt2CmakeFlags : IO (Array String) := do | .macos => flags := flags ++ #["-DWITH_ACCELERATE=ON", "-DWITH_OPENBLAS=OFF"] | .linux => flags := flags ++ #["-DWITH_ACCELERATE=OFF", "-DWITH_OPENBLAS=ON", "-DOPENBLAS_INCLUDE_DIR=../../OpenBLAS", "-DOPENBLAS_LIBRARY=../../OpenBLAS/libopenblas.so"] + -- [TODO] Temporary fix: Do not use CUDA even if it is available. + -- if ← useCUDA then + -- flags := flags ++ #["-DWITH_CUDA=ON", "-DWITH_CUDNN=ON"] + -- else + -- flags := flags ++ #["-DWITH_CUDA=OFF", "-DWITH_CUDNN=OFF"] + return flags