Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot reset CuArray to zero #2257

Closed
AhmedSalih3d opened this issue Jan 31, 2024 · 2 comments
Closed

Cannot reset CuArray to zero #2257

AhmedSalih3d opened this issue Jan 31, 2024 · 2 comments

Comments

@AhmedSalih3d
Copy link

Describe the bug

I do the following code:

x = CuArray(ones(5)); fill!(x,zero(eltype(x)))

The fill! operation errors out:

ERROR: MethodError: no method matching length(::Nothing)

Closest candidates are:
  length(::Base.MethodSpecializations)
   @ Base reflection.jl:1166
  length(::LLVM.ConstantAggregateZero)
   @ LLVM C:\Users\-\.julia\packages\LLVM\HykgZ\src\core\value\constant.jl:146
  length(::Core.Compiler.InstructionStream)
   @ Base show.jl:2777

To reproduce

The Minimal Working Example (MWE) for this bug:

x = CuArray(ones(5)); fill!(x,zero(eltype(x)))

Expected behavior

Should be able to reset array to zero.

Version info

Details on Julia:

# please post the output of:
versioninfo()

Details on CUDA:

# please post the output of:
CUDA.versioninfo()
CUDA runtime 11.8, artifact installation
CUDA driver 12.4
Unknown NVIDIA driver

Libraries:
- CUBLAS: 11.11.3
- CURAND: 10.3.0
- CUFFT: 10.9.0
- CUSOLVER: 11.4.1
- CUSPARSE: 11.7.5
- CUPTI: 18.0.0
- NVML: missing

Toolchain:
- Julia: 1.10.0
- LLVM: 15.0.7
- PTX ISA support: 3.2, 4.0, 4.1, 4.2, 4.3, 5.0, 6.0, 6.1, 6.3, 6.4, 6.5, 7.0, 7.1, 7.2, 7.3, 7.4, 7.5
- Device capability support: sm_35, sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80, sm_86
versioninfo()
Julia Version 1.10.0
Commit 3120989f39 (2023-12-25 18:01 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: Intel CPU
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-15.0.7 (ORCJIT, skylake)
  Threads: 5 on 8 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 4
@AhmedSalih3d AhmedSalih3d added the bug Something isn't working label Jan 31, 2024
@maleadt
Copy link
Member

maleadt commented Feb 1, 2024

You're using outdated packages.

@maleadt maleadt closed this as not planned Won't fix, can't repro, duplicate, stale Feb 1, 2024
@maleadt maleadt removed the bug Something isn't working label Feb 1, 2024
@AhmedSalih3d
Copy link
Author

Thanks for clarifying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants