CUDA backend: compile (#2276)

* CUDA backend: compile

* Rename kernels/ to device/
This commit is contained in:
Cheng
2025-06-13 09:08:39 +09:00
committed by GitHub
parent f5f65ef48c
commit a4fc671d3e
27 changed files with 910 additions and 27 deletions

View File

@@ -12,6 +12,8 @@ namespace cu {
class Device;
}
struct Dtype;
// Cuda stream managed with RAII.
class CudaStream {
public:
@@ -35,4 +37,7 @@ void check_cuda_error(const char* name, cudaError_t err);
// The macro version that prints the command that failed.
#define CHECK_CUDA_ERROR(cmd) check_cuda_error(#cmd, (cmd))
// Convert Dtype to CUDA C++ types.
const char* dtype_to_cuda_type(const Dtype& dtype);
} // namespace mlx::core