JuliaGPU / JuliaGPU/Metal.jl

MPS: Large matrix multiplications using can contains NaNs

Open
#381 41 comments 0 reactions 0 assignees View on GitHub
upstream
Dominant language
Julia
Stars
463
Forks
68
Avg merge
1d 19m
Merged PRs (30d)
32

Description

See updated MWE in https://github.com/JuliaGPU/Metal.jl/issues/381#issuecomment-2314653468:

---

Old MWE:

```julia-repl
julia> a = Metal.randn(10000, 10000);

julia> b = Metal.randn(10000, 10000);

julia> c = a * b';

julia> for i in 1:10
C = Metal.zeros(Float32, size(a))
mul!(C, a, b')
@assert C ≈ c "$i"
end
ERROR: AssertionError: 1
Stacktrace:
[1] top-level scope
@ ./REPL[58]:4

julia> for i in 1:10
C = Metal.zeros(Float32, size(a))
mul!(C, a, b')
@assert C ≈ c "$i"
end
ERROR: AssertionError: 8
Stacktrace:
[1] top-level scope
@ ./REPL[58]:4

julia> for i in 1:10
@assert a * b' ≈ c "$i"
end
ERROR: AssertionError: 3
Stacktrace:
[1] top-level scope
@ ./REPL[59]:2

julia> for i in 1:10
@assert a * b' ≈ c "$i"
end
ERROR: AssertionError: 8
Stacktrace:
[1] top-level scope
@ ./REPL[59]:2

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.