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

irfft of real valued CuArray returns a non-CuArray result #1891

Open
RainerHeintzmann opened this issue May 2, 2023 · 1 comment
Open

irfft of real valued CuArray returns a non-CuArray result #1891

RainerHeintzmann opened this issue May 2, 2023 · 1 comment
Labels
bug Something isn't working cuda libraries Stuff about CUDA library wrappers. good first issue Good for newcomers

Comments

@RainerHeintzmann
Copy link
Contributor

Description
An irfft applied to a real-value CuArray somehow seems to cause a collect to a non-Cuda array:
Example

julia> using CUDA, FFTW

julia> irfft(CuArray(ones(6,10)), 10)
10×10 Matrix{Float64}:
 1.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0

julia> irfft(CuArray(ones(ComplexF64, 6,10)), 10)
10×10 CuArray{Float64, 2, CUDA.Mem.DeviceBuffer}:
 1.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0  0.0
Manifest.toml

``` [052768ef] CUDA v4.2.0 ```

Expected behavior

A CuArray being returned.

Version info
4.2.0

Details on Julia:
1.8.2

# please post the output of:
Julia Version 1.8.2
Commit 36034abf26 (2022-09-29 15:21 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
  CPU: 16 × 11th Gen Intel(R) Core(TM) i7-11800H @ 2.30GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-13.0.1 (ORCJIT, tigerlake)
  Threads: 1 on 16 virtual cores

Details on CUDA:

CUDA runtime 12.1, artifact installation
CUDA driver 12.0
NVIDIA driver 527.37.0

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+527.37

Toolchain:
- Julia: 1.8.2
- LLVM: 13.0.1
- 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
- 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 GeForce RTX 3050 Ti Laptop GPU (sm_86, 3.411 GiB / 4.000 GiB available)

Additional context

Maybe collect is called somewhere unitentionally?

@RainerHeintzmann RainerHeintzmann added the bug Something isn't working label May 2, 2023
@maleadt maleadt added good first issue Good for newcomers cuda libraries Stuff about CUDA library wrappers. labels May 3, 2023
@RainerHeintzmann
Copy link
Contributor Author

this should be solved now (with other issues) by this pull request:
#1903

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working cuda libraries Stuff about CUDA library wrappers. good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants