mirror of
https://github.com/ml-explore/mlx.git
synced 2025-11-24 09:08:09 +08:00
Custom cuda kernel (#2517)
This commit is contained in:
committed by
GitHub
parent
f4c8888cbe
commit
e397177f6e
19
python/src/cuda.cpp
Normal file
19
python/src/cuda.cpp
Normal file
@@ -0,0 +1,19 @@
|
||||
// Copyright © 2023-2025 Apple Inc.
|
||||
|
||||
#include <nanobind/nanobind.h>
|
||||
|
||||
#include "mlx/backend/cuda/cuda.h"
|
||||
|
||||
namespace mx = mlx::core;
|
||||
namespace nb = nanobind;
|
||||
|
||||
void init_cuda(nb::module_& m) {
|
||||
nb::module_ cuda = m.def_submodule("cuda", "mlx.cuda");
|
||||
|
||||
cuda.def(
|
||||
"is_available",
|
||||
&mx::cu::is_available,
|
||||
R"pbdoc(
|
||||
Check if the CUDA back-end is available.
|
||||
)pbdoc");
|
||||
}
|
||||
Reference in New Issue
Block a user