Skip to content

Metal.randn! produces Nan #474

@rveltz

Description

@rveltz

Hi,

On a M2 Max with

(code) pkg> st
  [e9467ef8] GLMakie v0.10.15
  [63c18a36] KernelAbstractions v0.9.29
  [dde4c033] Metal v1.4.2
  [d96e819e] Parameters v0.12.3
  [91a5bcdd] Plots v1.40.8
  [92933f4c] ProgressMeter v1.10.2
  [295af30f] Revise v3.6.2
  [2913bbd2] StatsBase v0.34.3
  [9a3f8284] Random

I observe:

using Metal
N = 10_000_000
X0 = MtlArray(zeros(Float32, Int64(N) ));
Metal.randn!(X0)
sum(isnan, X0) # random number, seems always > 0

I hope this is not too difficult to fix.

best regards

Metadata

Metadata

Assignees

No one assigned

    Labels

    upstreamOut of our hands

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions