MLX
 
Loading...
Searching...
No Matches
utils.h File Reference
#include "mlx/array.h"
#include "mlx/backend/metal/device.h"
#include "mlx/primitives.h"

Go to the source code of this file.

Namespaces

namespace  mlx
 
namespace  mlx::core
 

Functions

std::string mlx::core::type_to_name (const Dtype &t)
 
std::string mlx::core::type_to_name (const array &a)
 
MTL::Size mlx::core::get_block_dims (int dim0, int dim1, int dim2, int pow2=10)
 
MTL::Size mlx::core::get_2d_grid_dims (const Shape &shape, const Strides &strides)
 
MTL::Size mlx::core::get_2d_grid_dims (const Shape &shape, const Strides &strides, size_t divisor)
 
NS::String * mlx::core::make_string (std::ostringstream &os)
 
void mlx::core::debug_set_stream_queue_label (MTL::CommandQueue *queue, int index)
 
void mlx::core::debug_set_primitive_buffer_label (MTL::CommandBuffer *command_buffer, Primitive &primitive)
 
std::string mlx::core::get_primitive_string (Primitive *primitive)
 
template<typename T>
void mlx::core::concatenate (std::string &acc, T first)
 
template<typename T, typename... Args>
void mlx::core::concatenate (std::string &acc, T first, Args... args)
 
array mlx::core::unsafe_weak_copy (const array &x)
 Get a new array that refers to the same data but has a non-owning pointer to them.