|
@@ -13,6 +13,9 @@ package("ginkgo")
|
|
add_configs("cuda", {description = "Compile kernels for NVIDIA GPUs.", default = false, type = "boolean"})
|
|
add_configs("cuda", {description = "Compile kernels for NVIDIA GPUs.", default = false, type = "boolean"})
|
|
add_configs("hip", {description = "Compile kernels for AMD or NVIDIA GPUs.", default = false, type = "boolean"})
|
|
add_configs("hip", {description = "Compile kernels for AMD or NVIDIA GPUs.", default = false, type = "boolean"})
|
|
add_configs("sycl", {description = "Compile SYCL kernels for Intel GPUs or other SYCL enabled hardware.", default = false, type = "boolean"})
|
|
add_configs("sycl", {description = "Compile SYCL kernels for Intel GPUs or other SYCL enabled hardware.", default = false, type = "boolean"})
|
|
|
|
+ add_configs("jacobi_full", {description = "Use all the optimizations for the CUDA Jacobi algorithm.", default = false, type = "boolean"})
|
|
|
|
+
|
|
|
|
+ set_policy("package.cmake_generator.ninja", false)
|
|
|
|
|
|
add_deps("cmake")
|
|
add_deps("cmake")
|
|
on_load("windows", "macosx", "linux", function (package)
|
|
on_load("windows", "macosx", "linux", function (package)
|
|
@@ -20,7 +23,10 @@ package("ginkgo")
|
|
package:add("deps", "openmp")
|
|
package:add("deps", "openmp")
|
|
end
|
|
end
|
|
if package:config("cuda") then
|
|
if package:config("cuda") then
|
|
- package:add("deps", "cuda")
|
|
|
|
|
|
+ package:add("deps", "cuda", {configs = {utils = {"cublas", "cusparse"}}})
|
|
|
|
+ end
|
|
|
|
+ if not (package:is_plat("windows") and package:config("shared")) then
|
|
|
|
+ package:add("deps", "ninja")
|
|
end
|
|
end
|
|
-- TODO: add hip and sycl
|
|
-- TODO: add hip and sycl
|
|
end)
|
|
end)
|
|
@@ -33,7 +39,12 @@ package("ginkgo")
|
|
table.insert(configs, "-DGINKGO_BUILD_HIP=" .. (package:config("hip") and "ON" or "OFF"))
|
|
table.insert(configs, "-DGINKGO_BUILD_HIP=" .. (package:config("hip") and "ON" or "OFF"))
|
|
table.insert(configs, "-DGINKGO_BUILD_SYCL=" .. (package:config("sycl") and "ON" or "OFF"))
|
|
table.insert(configs, "-DGINKGO_BUILD_SYCL=" .. (package:config("sycl") and "ON" or "OFF"))
|
|
table.insert(configs, "-DGINKGO_BUILD_OMP=" .. (package:config("openmp") and "ON" or "OFF"))
|
|
table.insert(configs, "-DGINKGO_BUILD_OMP=" .. (package:config("openmp") and "ON" or "OFF"))
|
|
- import("package.tools.cmake").install(package, configs)
|
|
|
|
|
|
+ table.insert(configs, "-DGINKGO_JACOBI_FULL_OPTIMIZATIONS=" .. (package:config("jacobi_full") and "ON" or "OFF"))
|
|
|
|
+ local opt = {}
|
|
|
|
+ if not (package:is_plat("windows") and package:config("shared")) then
|
|
|
|
+ opt.cmake_generator = "Ninja"
|
|
|
|
+ end
|
|
|
|
+ import("package.tools.cmake").install(package, configs, opt)
|
|
end)
|
|
end)
|
|
|
|
|
|
on_test(function (package)
|
|
on_test(function (package)
|