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

Printing of CuArrays gives zeros or random numbers #2033

Closed
yuvalwas opened this issue Aug 15, 2023 · 4 comments
Closed

Printing of CuArrays gives zeros or random numbers #2033

yuvalwas opened this issue Aug 15, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@yuvalwas
Copy link

Describe the bug
Displaying CuArrays return mostly zeros and some random numbers, although sometimes it returns the correct array. Upon converting to Array it displays the array correctly.
Thanks for your help.

To reproduce

The Minimal Working Example (MWE) for this bug:

julia> a = CuArray(Float32[1,2,3])
3-element CuArray{Float32, 1, CUDA.Mem.DeviceBuffer}:
 2.3694278f-38
 1.0f-45
 0.0

julia> Array(a)
3-element Vector{Float32}:
 1.0
 2.0
 3.0

julia> CuArray(1:4)
4-element CuArray{Int64, 1, CUDA.Mem.DeviceBuffer}:
 4311810305
          0
          0
          0

julia> CuArray(1:4)
4-element CuArray{Int64, 1, CUDA.Mem.DeviceBuffer}:
 0
 0
 0
 0

julia> CuArray(1:4) |> Array
4-element Vector{Int64}:
 1
 2
 3
 4
Manifest.toml

I could not paste my Manifest here, as github complained it is too long.

Expected behavior

Correct printing of the arrays.

Version info

Details on Julia:

Julia Version 1.9.2
Commit e4ee485e90 (2023-07-05 09:39 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 32 × 13th Gen Intel(R) Core(TM) i9-13900K
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, goldmont)
  Threads: 22 on 32 virtual cores
Environment:
  JULIA_EDITOR = code
  JULIA_NUM_THREADS = 22

Details on CUDA:

CUDA runtime 12.1, artifact installation
CUDA driver 12.2
NVIDIA driver 536.96.0

CUDA libraries:
- CUBLAS: 12.1.3
- CURAND: 10.3.2
- CUFFT: 11.0.2
- CUSOLVER: 11.4.5
- CUSPARSE: 12.1.0
- CUPTI: 18.0.0
- NVML: 12.0.0+536.96

Julia packages:
- CUDA: 4.4.0
- CUDA_Driver_jll: 0.5.0+1
- CUDA_Runtime_jll: 0.6.0+0

Toolchain:
- Julia: 1.9.2
- LLVM: 14.0.6
- 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_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75, sm_80, sm_86

1 device:
  0: NVIDIA RTX A4500 (sm_86, 18.830 GiB / 19.990 GiB available)
@yuvalwas yuvalwas added the bug Something isn't working label Aug 15, 2023
@maleadt
Copy link
Member

maleadt commented Aug 15, 2023

Are you doing this in VSCode?

@yuvalwas
Copy link
Author

Are you doing this in VSCode?

Yes

@maleadt
Copy link
Member

maleadt commented Aug 15, 2023

Then this is a "bug" in VSCode: #875.

@maleadt maleadt closed this as not planned Won't fix, can't repro, duplicate, stale Aug 15, 2023
@yuvalwas
Copy link
Author

Ah, I see. Sorry for reposting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants