mirror of
https://github.com/ml-explore/mlx.git
synced 2025-09-19 10:48:09 +08:00
Array api (#1289)
* some updates for numpy 2.0 and array api * some updates for numpy 2.0 and array api * fix array api doc
This commit is contained in:
@@ -1839,15 +1839,6 @@ array argsort(const array& a, int axis, StreamOrDevice s /* = {} */) {
|
||||
throw std::invalid_argument(msg.str());
|
||||
}
|
||||
|
||||
// TODO: Fix GPU kernel
|
||||
if (a.shape(axis) >= (1u << 21) && to_stream(s).device.type == Device::gpu) {
|
||||
std::ostringstream msg;
|
||||
msg << "[argsort] GPU sort cannot handle sort axis of >= 2M elements,"
|
||||
<< " got array with sort axis size " << a.shape(axis) << "."
|
||||
<< " Please place this operation on the CPU instead.";
|
||||
throw std::runtime_error(msg.str());
|
||||
}
|
||||
|
||||
return array(
|
||||
a.shape(), uint32, std::make_shared<ArgSort>(to_stream(s), axis), {a});
|
||||
}
|
||||
|
Reference in New Issue
Block a user