mlx icon indicating copy to clipboard operation
mlx copied to clipboard

[BUG] cumsum fails with int64 array

Open TristanBilot opened this issue 1 year ago • 2 comments

Describe the bug When applying cumsum to an int64 array, there's a kernel error.

To Reproduce

import mlx.core as mx

a = mx.array([0, 1, 2], dtype=mx.int64)
mx.cumsum(a)

>>> libc++abi: terminating due to uncaught exception of type std::runtime_error: [metal::Device] Unable to load kernel contiguous_scan_inclusive_sum_int64_int64

[1]    48047 abort      python

Desktop (please complete the following information):

  • macOS 14.2
  • branch: main

TristanBilot avatar Feb 12 '24 12:02 TristanBilot

This is expected in as much as we don't have implementations of these for int64. Are you able to use a 32 bit type as a workaround?

awni avatar Feb 12 '24 13:02 awni

Ok, just wanted to open an issue in case. Yes I can work with int32 here.

TristanBilot avatar Feb 12 '24 15:02 TristanBilot