diff --git a/docs/build/html/.buildinfo b/docs/build/html/.buildinfo index 50696688e..3cf7fbd01 100644 --- a/docs/build/html/.buildinfo +++ b/docs/build/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: c431be841be9331fc029403834cef1bf +config: ad0493b39127084c2ab6331071fb3c9b tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/build/html/_static/documentation_options.js b/docs/build/html/_static/documentation_options.js index 51bee6816..213607d15 100644 --- a/docs/build/html/_static/documentation_options.js +++ b/docs/build/html/_static/documentation_options.js @@ -1,5 +1,5 @@ const DOCUMENTATION_OPTIONS = { - VERSION: '0.19.1', + VERSION: '0.19.2', LANGUAGE: 'en', COLLAPSE_INDEX: false, BUILDER: 'html', diff --git a/docs/build/html/annotated.html b/docs/build/html/annotated.html index 780672292..87141e0a0 100644 --- a/docs/build/html/annotated.html +++ b/docs/build/html/annotated.html @@ -91,6 +91,14 @@ $(function(){ initResizable(false); });
[detail level 12345]
+ + + + + + + + @@ -318,33 +326,39 @@ $(function(){ initResizable(false); }); - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/docs/build/html/backend_2metal_2device_8h_source.html b/docs/build/html/backend_2metal_2device_8h_source.html index 4ac2509f2..8b936bd40 100644 --- a/docs/build/html/backend_2metal_2device_8h_source.html +++ b/docs/build/html/backend_2metal_2device_8h_source.html @@ -258,106 +258,113 @@ $(function(){ initResizable(false); });
137 };
138
-
139 void new_queue(int index);
-
140 MTL::CommandBuffer* get_command_buffer(int index);
-
141 int get_command_buffer_ops(int index);
-
142 void increment_command_buffer_ops(int index);
-
143 void commit_command_buffer(int index);
-
144 CommandEncoder& get_command_encoder(int index);
-
145 void end_encoding(int index);
-
146
-
147 void register_library(
-
148 const std::string& lib_name,
-
149 const std::string& lib_path);
-
150
-
151 // Note, this should remain in the header so that it is not dynamically
-
152 // linked
-
-
153 void register_library(const std::string& lib_name) {
-
154 if (auto it = library_map_.find(lib_name); it == library_map_.end()) {
-
155 register_library(lib_name, get_colocated_mtllib_path(lib_name));
-
156 }
-
157 }
+
+
139 const std::string& get_architecture() {
+
140 return arch_;
+
141 }
+
+
142
+
143 void new_queue(int index);
+
144 MTL::CommandBuffer* get_command_buffer(int index);
+
145 int get_command_buffer_ops(int index);
+
146 void increment_command_buffer_ops(int index);
+
147 void commit_command_buffer(int index);
+
148 CommandEncoder& get_command_encoder(int index);
+
149 void end_encoding(int index);
+
150
+
151 void register_library(
+
152 const std::string& lib_name,
+
153 const std::string& lib_path);
+
154
+
155 // Note, this should remain in the header so that it is not dynamically
+
156 // linked
+
+
157 void register_library(const std::string& lib_name) {
+
158 if (auto it = library_map_.find(lib_name); it == library_map_.end()) {
+
159 register_library(lib_name, get_colocated_mtllib_path(lib_name));
+
160 }
+
161 }
-
158
-
159 MTL::Library* get_library(
-
160 const std::string& name,
-
161 const std::function<std::string(void)>& builder);
162
-
163 MTL::ComputePipelineState* get_kernel(
-
164 const std::string& base_name,
-
165 MTL::Library* mtl_lib,
-
166 const std::string& hash_name = "",
-
167 const MTLFCList& func_consts = {},
-
168 const std::vector<MTL::Function*>& linked_functions = {});
-
169
-
170 MTL::ComputePipelineState* get_kernel(
-
171 const std::string& base_name,
-
172 const std::string& lib_name = "mlx",
-
173 const std::string& hash_name = "",
-
174 const MTLFCList& func_consts = {},
-
175 const std::vector<MTL::Function*>& linked_functions = {});
-
176
-
177 MTL::ArgumentEncoder* argument_encoder(
-
178 const std::vector<MTL::ArgumentDescriptor*>& arg_descs) const;
-
179
-
180 // Record temporary arrays for the given stream index
-
181 void add_temporary(array arr, int index);
-
182 void add_temporaries(std::vector<array> arrays, int index);
+
163 MTL::Library* get_library(
+
164 const std::string& name,
+
165 const std::function<std::string(void)>& builder);
+
166
+
167 MTL::ComputePipelineState* get_kernel(
+
168 const std::string& base_name,
+
169 MTL::Library* mtl_lib,
+
170 const std::string& hash_name = "",
+
171 const MTLFCList& func_consts = {},
+
172 const std::vector<MTL::Function*>& linked_functions = {});
+
173
+
174 MTL::ComputePipelineState* get_kernel(
+
175 const std::string& base_name,
+
176 const std::string& lib_name = "mlx",
+
177 const std::string& hash_name = "",
+
178 const MTLFCList& func_consts = {},
+
179 const std::vector<MTL::Function*>& linked_functions = {});
+
180
+
181 MTL::ArgumentEncoder* argument_encoder(
+
182 const std::vector<MTL::ArgumentDescriptor*>& arg_descs) const;
183
-
184 void set_residency_set(const MTL::ResidencySet* residency_set);
-
185
-
186 private:
-
187 DeviceStream& get_stream_(int index) {
-
188 return stream_map_.find(index)->second;
-
189 }
-
190 MTL::Library* get_library_cache_(const std::string& name);
-
191
-
192 MTL::Library* get_library_(const std::string& name);
-
193 MTL::Library* build_library_(const std::string& source_string);
-
194
-
195 MTL::Function* get_function_(const std::string& name, MTL::Library* mtl_lib);
-
196
-
197 MTL::Function* get_function_(
-
198 const std::string& name,
-
199 const std::string& specialized_name,
-
200 const MTLFCList& func_consts,
-
201 MTL::Library* mtl_lib);
-
202
-
203 MTL::LinkedFunctions* get_linked_functions_(
-
204 const std::vector<MTL::Function*>& funcs);
-
205
-
206 MTL::ComputePipelineState* get_kernel_(
-
207 const std::string& name,
-
208 const MTL::Function* mtl_function);
+
184 // Record temporary arrays for the given stream index
+
185 void add_temporary(array arr, int index);
+
186 void add_temporaries(std::vector<array> arrays, int index);
+
187
+
188 void set_residency_set(const MTL::ResidencySet* residency_set);
+
189
+
190 private:
+
191 DeviceStream& get_stream_(int index) {
+
192 return stream_map_.find(index)->second;
+
193 }
+
194 MTL::Library* get_library_cache_(const std::string& name);
+
195
+
196 MTL::Library* get_library_(const std::string& name);
+
197 MTL::Library* build_library_(const std::string& source_string);
+
198
+
199 MTL::Function* get_function_(const std::string& name, MTL::Library* mtl_lib);
+
200
+
201 MTL::Function* get_function_(
+
202 const std::string& name,
+
203 const std::string& specialized_name,
+
204 const MTLFCList& func_consts,
+
205 MTL::Library* mtl_lib);
+
206
+
207 MTL::LinkedFunctions* get_linked_functions_(
+
208 const std::vector<MTL::Function*>& funcs);
209
210 MTL::ComputePipelineState* get_kernel_(
211 const std::string& name,
-
212 const MTL::Function* mtl_function,
-
213 const MTL::LinkedFunctions* linked_functions);
-
214
-
215 MTL::ComputePipelineState* get_kernel_(
-
216 const std::string& base_name,
-
217 MTL::Library* mtl_lib,
-
218 const std::string& hash_name,
-
219 const MTLFCList& func_consts = {},
-
220 const std::vector<MTL::Function*>& linked_functions = {});
-
221
-
222 MTL::Device* device_;
-
223 std::unordered_map<int32_t, DeviceStream> stream_map_;
-
224
-
225 std::shared_mutex kernel_mtx_;
-
226 std::unordered_map<std::string, MTL::ComputePipelineState*> kernel_map_;
-
227
-
228 std::shared_mutex library_mtx_;
-
229 std::unordered_map<std::string, MTL::Library*> library_map_;
-
230 const MTL::ResidencySet* residency_set_{nullptr};
-
231};
+
212 const MTL::Function* mtl_function);
+
213
+
214 MTL::ComputePipelineState* get_kernel_(
+
215 const std::string& name,
+
216 const MTL::Function* mtl_function,
+
217 const MTL::LinkedFunctions* linked_functions);
+
218
+
219 MTL::ComputePipelineState* get_kernel_(
+
220 const std::string& base_name,
+
221 MTL::Library* mtl_lib,
+
222 const std::string& hash_name,
+
223 const MTLFCList& func_consts = {},
+
224 const std::vector<MTL::Function*>& linked_functions = {});
+
225
+
226 MTL::Device* device_;
+
227 std::unordered_map<int32_t, DeviceStream> stream_map_;
+
228
+
229 std::shared_mutex kernel_mtx_;
+
230 std::unordered_map<std::string, MTL::ComputePipelineState*> kernel_map_;
+
231
+
232 std::shared_mutex library_mtx_;
+
233 std::unordered_map<std::string, MTL::Library*> library_map_;
+
234 const MTL::ResidencySet* residency_set_{nullptr};
+
235 std::string arch_;
+
236};
-
232
-
233Device& device(mlx::core::Device);
-
234
-
235} // namespace mlx::core::metal
+
237
+
238Device& device(mlx::core::Device);
+
239
+
240} // namespace mlx::core::metal
array.h
mlx::core::array
Definition array.h:20
mlx::core::metal::Device
Definition device.h:128
@@ -368,6 +375,7 @@ $(function(){ initResizable(false); });
mlx::core::metal::Device::~Device
~Device()
mlx::core::metal::Device::get_command_buffer
MTL::CommandBuffer * get_command_buffer(int index)
mlx::core::metal::Device::end_encoding
void end_encoding(int index)
+
mlx::core::metal::Device::get_architecture
const std::string & get_architecture()
Definition device.h:139
mlx::core::metal::Device::get_kernel
MTL::ComputePipelineState * get_kernel(const std::string &base_name, MTL::Library *mtl_lib, const std::string &hash_name="", const MTLFCList &func_consts={}, const std::vector< MTL::Function * > &linked_functions={})
mlx::core::metal::Device::argument_encoder
MTL::ArgumentEncoder * argument_encoder(const std::vector< MTL::ArgumentDescriptor * > &arg_descs) const
mlx::core::metal::Device::add_temporaries
void add_temporaries(std::vector< array > arrays, int index)
@@ -375,7 +383,7 @@ $(function(){ initResizable(false); });
mlx::core::metal::Device::increment_command_buffer_ops
void increment_command_buffer_ops(int index)
mlx::core::metal::Device::new_queue
void new_queue(int index)
mlx::core::metal::Device::commit_command_buffer
void commit_command_buffer(int index)
-
mlx::core::metal::Device::register_library
void register_library(const std::string &lib_name)
Definition device.h:153
+
mlx::core::metal::Device::register_library
void register_library(const std::string &lib_name)
Definition device.h:157
mlx::core::metal::Device::Device
Device(const Device &)=delete
mlx::core::metal::Device::add_temporary
void add_temporary(array arr, int index)
mlx::core::metal::Device::operator=
Device & operator=(const Device &)=delete
diff --git a/docs/build/html/classes.html b/docs/build/html/classes.html index 86f2fcfe5..31672a75b 100644 --- a/docs/build/html/classes.html +++ b/docs/build/html/classes.html @@ -94,7 +94,7 @@ $(function(){ initResizable(false); });
Abs
Abs (mlx::core)
Abs (mlx::core::detail)
AccumHelper (mlx::steel)
Add
Add (mlx::core)
Add (mlx::core::detail)
add_vec (pocketfft::detail)
add_vec< cmplx< T > > (pocketfft::detail)
AddMM (mlx::core)
AffineQuantize (mlx::core::fast)
aligned_allocator (pocketfft::detail::threading)
AllGather (mlx::core::distributed)
Allocator (mlx::core::allocator)
AllReduce (mlx::core::distributed)
And
Arange (mlx::core)
ArcCos
ArcCos (mlx::core)
ArcCos (mlx::core::detail)
ArcCosh
ArcCosh (mlx::core)
ArcCosh (mlx::core::detail)
ArcSin
ArcSin (mlx::core)
ArcSin (mlx::core::detail)
ArcSinh
ArcSinh (mlx::core)
ArcSinh (mlx::core::detail)
ArcTan
ArcTan (mlx::core)
ArcTan (mlx::core::detail)
ArcTan2
ArcTan2 (mlx::core)
ArcTan2 (mlx::core::detail)
ArcTanh
ArcTanh (mlx::core)
ArcTanh (mlx::core::detail)
ArgPartition (mlx::core)
ArgReduce (mlx::core)
ArgSort (mlx::core)
arr (pocketfft::detail)
arr_info (pocketfft::detail)
array (mlx::core)
array::ArrayIterator (mlx::core)
AsStrided (mlx::core)
AsType (mlx::core)
B
-
_MLX_BFloat16::bits_to_bfloat_struct
BitwiseAnd
BitwiseAnd (mlx::core::detail)
BitwiseBinary (mlx::core)
BitwiseOr
BitwiseOr (mlx::core::detail)
BitwiseXor
BitwiseXor (mlx::core::detail)
BlockLoader (mlx::steel)
BlockMaskedMM (mlx::core)
BlockMergeSort
BlockMMA (mlx::steel)
BlockSwizzle (mlx::steel)
bool4_or_uint
Broadcast (mlx::core)
Buffer (mlx::core::allocator)
+
BaseMMAFrag (mlx::steel)
BaseMMAFrag< T, 8, 8 > (mlx::steel)
_MLX_BFloat16::bits_to_bfloat_struct
BitwiseAnd
BitwiseAnd (mlx::core::detail)
BitwiseBinary (mlx::core)
BitwiseOr
BitwiseOr (mlx::core::detail)
BitwiseXor
BitwiseXor (mlx::core::detail)
BlockLoader (mlx::steel)
BlockMaskedMM (mlx::core)
BlockMergeSort
BlockMMA (mlx::steel)
BlockSwizzle (mlx::steel)
bool4_or_uint
Broadcast (mlx::core)
Buffer (mlx::core::allocator)
C
Ceil
Ceil (mlx::core)
Ceil (mlx::core::detail)
cfftp (pocketfft::detail)
ChannelHelper (mlx::steel)
ChannelHelper< 1 > (mlx::steel)
ChannelHelper< 2 > (mlx::steel)
ChannelHelper< 3 > (mlx::steel)
ChannelHelper< 4 > (mlx::steel)
Cholesky (mlx::core)
cmplx (pocketfft::detail)
cndarr (pocketfft::detail)
CommandEncoder (mlx::core::metal)
CommonAllocator (mlx::core::allocator)
Compiled (mlx::core)
complex128_t (mlx::core)
complex64_t
complex64_t (mlx::core)
Concatenate (mlx::core)
concurrent_queue (pocketfft::detail::threading)
CommandEncoder::ConcurrentContext (mlx::core::metal)
Conjugate
Conjugate (mlx::core)
Conjugate (mlx::core::detail)
ContiguousIterator (mlx::core)
Conv2DGeneralBaseInfo (mlx::steel)
Conv2DGeneralJumpParams (mlx::steel)
Conv2DInputBlockLoaderGeneral (mlx::steel)
Conv2DInputBlockLoaderLargeFilter (mlx::steel)
Conv2DInputBlockLoaderSmallChannels (mlx::steel)
Conv2DInputBlockLoaderSmallFilter (mlx::steel)
Conv2DWeightBlockLoader (mlx::steel)
Conv2DWeightBlockLoaderGeneral (mlx::steel)
Conv2DWeightBlockLoaderSmallChannels (mlx::steel)
Convolution (mlx::core)
Copy (mlx::core)
Cos
Cos (mlx::core)
Cos (mlx::core::detail)
Cosh
Cosh (mlx::core)
Cosh (mlx::core::detail)
CumMax
CumMin
CumProd
CumProd< bool >
CumSum
Custom (mlx::core::fast)
CustomKernel (mlx::core::fast)
CustomKernelShapeInfo (mlx::core::fast)
CustomTransforms (mlx::core)
@@ -115,7 +115,7 @@ $(function(){ initResizable(false); });
Hadamard (mlx::core)
I
-
Imag
Imag (mlx::core::detail)
Imag (mlx::core)
ImplicitGemmConv2DParams (mlx::steel)
Indices
IntOrFloat (mlx::core::detail)
InTracing (mlx::core::detail)
Inverse (mlx::core)
+
Imag
Imag (mlx::core::detail)
Imag (mlx::core)
ImplicitGemmConv2DParams (mlx::steel)
Indices
integral_constant (mlx::steel)
IntOrFloat (mlx::core::detail)
InTracing (mlx::core::detail)
Inverse (mlx::core)
is_empty (metal)
is_integral (mlx::steel)
is_integral< integral_constant< T, v > > (mlx::steel)
is_static (metal)
K
KernelMergeSort
KernelMultiBlockMergeSort
KeySequence (mlx::core::random)
@@ -124,7 +124,7 @@ $(function(){ initResizable(false); });
latch (pocketfft::detail::threading)
LayerNorm (mlx::core::fast)
LayerNormVJP (mlx::core::fast)
LeftShift
LeftShift (mlx::core::detail)
Less
Less (mlx::core::detail)
Less (mlx::core)
LessEqual
LessEqual (mlx::core::detail)
LessEqual (mlx::core)
LessThan
Limits
Limits< bfloat16_t >
Limits< bool >
Limits< complex64_t >
Limits< float >
Limits< half >
Limits< int16_t >
Limits< int32_t >
Limits< int64_t >
Limits< int8_t >
Limits< uint16_t >
Limits< uint32_t >
Limits< uint64_t >
Limits< uint8_t >
Load (mlx::core)
Log
Log (mlx::core::detail)
Log (mlx::core)
Log10
Log10 (mlx::core::detail)
Log1p
Log1p (mlx::core::detail)
Log1p (mlx::core)
Log2
Log2 (mlx::core::detail)
LogAddExp
LogAddExp (mlx::core::detail)
LogAddExp (mlx::core)
LogicalAnd
LogicalAnd (mlx::core::detail)
LogicalAnd (mlx::core)
LogicalNot
LogicalNot (mlx::core::detail)
LogicalNot (mlx::core)
LogicalOr
LogicalOr (mlx::core::detail)
LogicalOr (mlx::core)
LoopAlignment (mlx::steel)
looped_elem_to_loc
looped_elem_to_loc< 0, offset_t >
looped_elem_to_loc< 1, offset_t >
M
-
Matmul (mlx::core)
Max
Maximum
Maximum (mlx::core::detail)
Maximum (mlx::core)
MetalAllocator (mlx::core::metal)
Min
Minimum
Minimum (mlx::core::detail)
Minimum (mlx::core)
mlx_atomic
mlx_atomic< T, enable_if_t< is_metal_atomic< T > > >
MLXConvParams
MLXFastAttentionParams
MLXScaledDotProductAttentionParams
multi_iter (pocketfft::detail)
Multiply (mlx::core::detail)
Multiply (mlx::core)
Multiply
+
make_void (metal)
Matmul (mlx::core)
Max
Maximum
Maximum (mlx::core::detail)
Maximum (mlx::core)
MetalAllocator (mlx::core::metal)
Min
Minimum
Minimum (mlx::core::detail)
Minimum (mlx::core)
mlx_atomic
mlx_atomic< T, enable_if_t< is_metal_atomic< T > > >
MLXConvParams
MLXFastAttentionParams
MLXScaledDotProductAttentionParams
MMATile (mlx::steel)
multi_iter (pocketfft::detail)
Multiply (mlx::core::detail)
Multiply (mlx::core)
Multiply
N
NaNEqual (mlx::core::detail)
NaNEqual
ndarr (pocketfft::detail)
Negative (mlx::core::detail)
Negative (mlx::core)
Negative
NodeNamer (mlx::core)
None
NotEqual (mlx::core::detail)
NotEqual (mlx::core)
NotEqual
NumberOfElements (mlx::core)
@@ -133,7 +133,7 @@ $(function(){ initResizable(false); });
Or
P
-
Pad (mlx::core)
ParallelFileReader (mlx::core::io)
Partition (mlx::core)
pocketfft_c (pocketfft::detail)
pocketfft_r (pocketfft::detail)
Power (mlx::core::detail)
Power (mlx::core)
Power
Primitive (mlx::core)
PrintFormatter (mlx::core)
Prod
+
Pad (mlx::core)
ParallelFileReader (mlx::core::io)
Partition (mlx::core)
pocketfft_c (pocketfft::detail)
pocketfft_r (pocketfft::detail)
pointer_element (metal)
pointer_element< constant T * > (metal)
pointer_element< device T * > (metal)
pointer_element< thread T * > (metal)
pointer_element< threadgroup T * > (metal)
Power (mlx::core::detail)
Power (mlx::core)
Power
Primitive (mlx::core)
PrintFormatter (mlx::core)
Prod
Q
QRF (mlx::core)
QuantizedBlockLoader
QuantizedMatmul (mlx::core)
diff --git a/docs/build/html/classmlx_1_1core_1_1metal_1_1_device-members.html b/docs/build/html/classmlx_1_1core_1_1metal_1_1_device-members.html index de06eb6a1..d7b6c9cbc 100644 --- a/docs/build/html/classmlx_1_1core_1_1metal_1_1_device-members.html +++ b/docs/build/html/classmlx_1_1core_1_1metal_1_1_device-members.html @@ -101,20 +101,21 @@ $(function(){ initResizable(false); }); - - - - - - - - - - - - - - + + + + + + + + + + + + + + +
 Nmetal
 Nmlx
 Npocketfft
Device()mlx::core::metal::Device
Device(const Device &)=deletemlx::core::metal::Device
end_encoding(int index)mlx::core::metal::Device
get_command_buffer(int index)mlx::core::metal::Device
get_command_buffer_ops(int index)mlx::core::metal::Device
get_command_encoder(int index)mlx::core::metal::Device
get_kernel(const std::string &base_name, MTL::Library *mtl_lib, const std::string &hash_name="", const MTLFCList &func_consts={}, const std::vector< MTL::Function * > &linked_functions={})mlx::core::metal::Device
get_kernel(const std::string &base_name, const std::string &lib_name="mlx", const std::string &hash_name="", const MTLFCList &func_consts={}, const std::vector< MTL::Function * > &linked_functions={})mlx::core::metal::Device
get_library(const std::string &name, const std::function< std::string(void)> &builder)mlx::core::metal::Device
increment_command_buffer_ops(int index)mlx::core::metal::Device
mtl_device()mlx::core::metal::Deviceinline
new_queue(int index)mlx::core::metal::Device
operator=(const Device &)=deletemlx::core::metal::Device
register_library(const std::string &lib_name, const std::string &lib_path)mlx::core::metal::Device
register_library(const std::string &lib_name)mlx::core::metal::Deviceinline
set_residency_set(const MTL::ResidencySet *residency_set)mlx::core::metal::Device
~Device()mlx::core::metal::Device
get_architecture()mlx::core::metal::Deviceinline
get_command_buffer(int index)mlx::core::metal::Device
get_command_buffer_ops(int index)mlx::core::metal::Device
get_command_encoder(int index)mlx::core::metal::Device
get_kernel(const std::string &base_name, MTL::Library *mtl_lib, const std::string &hash_name="", const MTLFCList &func_consts={}, const std::vector< MTL::Function * > &linked_functions={})mlx::core::metal::Device
get_kernel(const std::string &base_name, const std::string &lib_name="mlx", const std::string &hash_name="", const MTLFCList &func_consts={}, const std::vector< MTL::Function * > &linked_functions={})mlx::core::metal::Device
get_library(const std::string &name, const std::function< std::string(void)> &builder)mlx::core::metal::Device
increment_command_buffer_ops(int index)mlx::core::metal::Device
mtl_device()mlx::core::metal::Deviceinline
new_queue(int index)mlx::core::metal::Device
operator=(const Device &)=deletemlx::core::metal::Device
register_library(const std::string &lib_name, const std::string &lib_path)mlx::core::metal::Device
register_library(const std::string &lib_name)mlx::core::metal::Deviceinline
set_residency_set(const MTL::ResidencySet *residency_set)mlx::core::metal::Device
~Device()mlx::core::metal::Device