Skip to content

Commit

Permalink
v0.18.1 mlx tag (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidkoski authored Oct 18, 2024
1 parent c09a4f4 commit d649c62
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Source/Cmlx/mlx
Submodule mlx updated 49 files
+5 −5 .circleci/config.yml
+7 −4 CMakeLists.txt
+1 −0 docs/src/python/ops.rst
+1 −0 docs/src/python/random.rst
+2 −2 examples/extensions/pyproject.toml
+2 −2 examples/extensions/requirements.txt
+40 −14 mlx/array.cpp
+26 −4 mlx/array.h
+5 −3 mlx/backend/accelerate/softmax.cpp
+24 −9 mlx/backend/common/indexing.cpp
+48 −26 mlx/backend/common/sort.cpp
+34 −5 mlx/backend/common/utils.h
+24 −17 mlx/backend/metal/conv.cpp
+3 −1 mlx/backend/metal/custom_kernel.cpp
+5 −0 mlx/backend/metal/event.cpp
+10 −3 mlx/backend/metal/fft.cpp
+6 −2 mlx/backend/metal/hadamard.cpp
+1 −1 mlx/backend/metal/kernels/binary_ops.h
+1 −1 mlx/backend/metal/kernels/conv.metal
+3 −3 mlx/backend/metal/kernels/softmax.h
+95 −158 mlx/backend/metal/matmul.cpp
+7 −2 mlx/backend/metal/matmul.h
+1 −1 mlx/backend/metal/metal.cpp
+30 −6 mlx/backend/metal/normalization.cpp
+12 −4 mlx/backend/metal/quantized.cpp
+5 −2 mlx/backend/metal/reduce.cpp
+4 −2 mlx/backend/metal/scan.cpp
+6 −2 mlx/backend/metal/softmax.cpp
+3 −1 mlx/backend/metal/sort.cpp
+7 −0 mlx/backend/no_metal/event.cpp
+3 −0 mlx/event.h
+90 −0 mlx/ops.cpp
+24 −0 mlx/ops.h
+33 −20 mlx/primitives.cpp
+15 −0 mlx/random.cpp
+13 −0 mlx/random.h
+5 −6 mlx/transforms.cpp
+1 −1 pyproject.toml
+15 −2 python/mlx/nn/layers/convolution.py
+50 −0 python/src/ops.cpp
+33 −0 python/src/random.cpp
+34 −0 python/tests/test_array.py
+101 −1 python/tests/test_conv.py
+7 −5 python/tests/test_eval.py
+8 −0 python/tests/test_nn.py
+50 −0 python/tests/test_ops.py
+23 −0 python/tests/test_random.py
+2 −2 setup.py
+39 −0 tests/ops_tests.cpp
2 changes: 1 addition & 1 deletion Source/Cmlx/mlx-generated/binary_ops.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ struct Power {
}
template <>
complex64_t operator()(complex64_t x, complex64_t y) {
auto x_theta = metal::atan(x.imag / x.real);
auto x_theta = metal::atan2(x.imag, x.real);
auto x_ln_r = 0.5 * metal::log(x.real * x.real + x.imag * x.imag);
auto mag = metal::exp(y.real * x_ln_r - y.imag * x_theta);
auto phase = y.imag * x_ln_r + y.real * x_theta;
Expand Down
6 changes: 3 additions & 3 deletions Source/Cmlx/mlx-generated/softmax.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ template <typename T, typename AccT = T, int N_READS = SOFTMAX_N_READS>
}
} else {
for (int i = 0; i < N_READS; i++) {
ld[i] = ((lid * N_READS + i) < axis_size) ? AccT(in[i])
: Limits<AccT>::finite_min;
ld[i] =
((lid * N_READS + i) < axis_size) ? AccT(in[i]) : Limits<AccT>::min;
}
}
if (simd_group_id == 0) {
local_max[simd_lane_id] = Limits<AccT>::finite_min;
local_max[simd_lane_id] = Limits<AccT>::min;
local_normalizer[simd_lane_id] = 0;
}
threadgroup_barrier(mem_flags::mem_threadgroup);
Expand Down

0 comments on commit d649c62

Please sign in to comment.