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

Function device_count

mlx/device.cpp:39–48  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

37}
38
39int device_count(Device::DeviceType type) {
40 switch (type) {
41 case Device::cpu:
42 return cpu::device_count();
43 case Device::gpu:
44 return gpu::device_count();
45 }
46 // appease compiler
47 return 0;
48}
49
50const std::unordered_map<std::string, std::variant<std::string, size_t>>&
51device_info(const Device& d) {

Callers 2

is_availableFunction · 0.70
stream.cppFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected