Run CPP tests for CUDA build in CI (#2544)

This commit is contained in:
Cheng
2025-08-27 08:06:46 +09:00
committed by GitHub
parent 5458d43247
commit a9bac3d9e5
6 changed files with 29 additions and 7 deletions

View File

@@ -67,9 +67,11 @@ const std::string& cccl_dir() {
return path.string();
}
// Finally check the environment variable.
path = std::getenv("MLX_CCCL_DIR");
if (!path.empty() && std::filesystem::exists(path)) {
return path.string();
if (const char* env = std::getenv("MLX_CCCL_DIR"); env) {
path = env;
if (!path.empty() && std::filesystem::exists(path)) {
return path.string();
}
}
return std::string();
}();

View File

@@ -4,6 +4,7 @@
#include "mlx/array.h"
#include "mlx/backend/cuda/cuda.h"
#include "mlx/backend/gpu/available.h"
#include "mlx/backend/metal/metal.h"
#include "mlx/compile.h"
#include "mlx/device.h"