Skip to content

Commit a60235f

Browse files
author
Aegis-AI
committed
fix(mlx-c): stub out turbo_encode to fix CI build
mlx::core::fast::turbo_encode() does not exist in the upstream MLX library yet. Replace the broken call with a std::runtime_error stub that compiles cleanly. The real implementation will be wired in once the TurboQuant C++ core is available upstream.
1 parent 9872877 commit a60235f

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

  • LocalPackages/mlx-swift/Source/Cmlx/mlx-c/mlx/c

LocalPackages/mlx-swift/Source/Cmlx/mlx-c/mlx/c/fast.cpp

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -789,18 +789,9 @@ extern "C" int mlx_fast_turbo_encode(
789789
int k_bits,
790790
const mlx_stream s) {
791791
try {
792-
// Evaluate the TurboQuant primitive to get PolarQuant tensors
793-
auto qkv = mlx::core::fast::turbo_encode(
794-
mlx_array_get_(keys),
795-
mlx_array_get_(values),
796-
k_bits,
797-
mlx_stream_get_(s).device
798-
);
799-
800-
mlx_array_set_(*res_polar_k, qkv.polar_keys);
801-
mlx_array_set_(*res_polar_v, qkv.polar_values);
802-
mlx_array_set_(*res_residual_k, qkv.qjl_key_residuals);
803-
mlx_array_set_(*res_residual_v, qkv.qjl_value_residuals);
792+
// TurboQuant C++ core not yet implemented — stub returns error.
793+
// Will be wired up when mlx::core::fast::turbo_encode() is available.
794+
throw std::runtime_error("turbo_encode: not yet implemented in this build");
804795
} catch (std::exception& e) {
805796
mlx_error(e.what());
806797
return 1;

0 commit comments

Comments
 (0)