MCPcopy Create free account
hub / github.com/ml-explore/mlx / current_binary_dir

Function current_binary_dir

mlx/backend/common/utils.cpp:9–18  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7namespace mlx::core {
8
9std::filesystem::path current_binary_dir() {
10 static std::filesystem::path binary_dir = []() {
11 Dl_info info;
12 if (!dladdr(reinterpret_cast<void*>(&current_binary_dir), &info)) {
13 throw std::runtime_error("Unable to get current binary dir.");
14 }
15 return std::filesystem::path(info.dli_fname).parent_path();
16 }();
17 return binary_dir;
18}
19
20std::tuple<Shape, std::vector<Strides>> collapse_contiguous_dims(
21 const Shape& shape,

Callers 4

load_colocated_libraryFunction · 0.50
load_libraryFunction · 0.50
jit_module.cppFile · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected