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

template<typename T >
void mlx::core::set_vector_bytes (CommandEncoder &enc, const std::vector< T > &vec, size_t nelems, int idx)
 
template<typename T >
void mlx::core::set_vector_bytes (CommandEncoder &enc, const std::vector< T > &vec, int idx)
 
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 std::vector< int > &shape, const std::vector< size_t > &strides)
 
MTL::Size mlx::core::get_2d_grid_dims (const std::vector< int > &shape, const std::vector< size_t > &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)