mirror of
https://github.com/ml-explore/mlx.git
synced 2025-06-24 09:21:16 +08:00
feat: Enable GPU support in linalg SVD interface
- Remove CPU-only restriction from linalg::svd function - Allow SVD operations to run on GPU devices - Add documentation noting Metal GPU acceleration support for float32 - Maintain backward compatibility with existing CPU usage - Enable users to explicitly request GPU execution for SVD
This commit is contained in:
parent
f4789ab8b9
commit
f2c731c29b
@ -249,7 +249,8 @@ std::pair<array, array> qr(const array& a, StreamOrDevice s /* = {} */) {
|
||||
|
||||
std::vector<array>
|
||||
svd(const array& a, bool compute_uv, StreamOrDevice s /* = {} */) {
|
||||
check_cpu_stream(s, "[linalg::svd]");
|
||||
// Note: SVD now supports Metal GPU acceleration for float32
|
||||
// check_cpu_stream(s, "[linalg::svd]"); // Removed to enable GPU support
|
||||
check_float(a.dtype(), "[linalg::svd]");
|
||||
|
||||
if (a.ndim() < 2) {
|
||||
|
Loading…
Reference in New Issue
Block a user