Skip to content

std with dims is not type stable #336

Closed

Description

Describe the bug

std function from Statistics is type unstable when used on CuArray with the dims argument

To reproduce

The Minimal Working Example (MWE) for this bug:

using CUDA
a = rand(3, 10) |> cu
@code_warntype std(a)  # Type Inference works
@code_warntype std(a, dims = 2)  # Type Inference fails
Dependencies

Status `~/research/CUDATests/Project.toml`
  [6e4b80f9] BenchmarkTools v0.5.0
  [052768ef] CUDA v1.2.0 #master (https://github.com/JuliaGPU/CUDA.jl.git)

Verified on both the latest release and master

Version info

Details on Julia:

Julia Version 1.4.2
Commit 44fa15b150* (2020-05-23 18:35 UTC)
Platform Info:
  OS: Linux (x86_64-pc-linux-gnu)
  CPU: Intel(R) Xeon(R) CPU E5-2603 v4 @ 1.70GHz
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-8.0.1 (ORCJIT, broadwell)
Environment:
  JULIA_PKG_DEVDIR = /home/avik-pal/research

Details on CUDA:

CUDA toolkit 10.1.243, artifact installation
CUDA driver 10.1.0
NVIDIA driver 418.67.0

Libraries: 
- CUBLAS: 10.2.1
- CURAND: 10.1.1
- CUFFT: 10.1.1
- CUSOLVER: 10.2.0
- CUSPARSE: 10.3.0
- CUPTI: 12.0.0
- NVML: 10.0.0+418.67
- CUDNN: 7.6.5 (for CUDA 10.1.0)
- CUTENSOR: 1.2.0 (for CUDA 10.1.0)

Toolchain:
- Julia: 1.4.2
- LLVM: 8.0.1
- PTX ISA support: 3.2, 4.0, 4.1, 4.2, 4.3, 5.0, 6.0, 6.1, 6.3
- Device support: sm_30, sm_32, sm_35, sm_37, sm_50, sm_52, sm_53, sm_60, sm_61, sm_62, sm_70, sm_72, sm_75

9 device(s):
- GeForce GTX 1080 Ti (sm_61, 10.905 GiB / 10.917 GiB available)
- Tesla P100-PCIE-16GB (sm_60, 15.890 GiB / 15.899 GiB available)
- GeForce GTX 1080 Ti (sm_61, 10.232 GiB / 10.917 GiB available)
- Tesla P100-PCIE-16GB (sm_60, 15.890 GiB / 15.899 GiB available)
- Tesla V100-PCIE-32GB (sm_70, 30.338 GiB / 31.719 GiB available)
- Tesla V100-PCIE-32GB (sm_70, 31.586 GiB / 31.719 GiB available)
- Tesla V100-PCIE-32GB (sm_70, 28.039 GiB / 31.719 GiB available)
- Tesla V100-PCIE-32GB (sm_70, 31.594 GiB / 31.719 GiB available)
- Tesla V100-PCIE-16GB (sm_70, 15.741 GiB / 15.752 GiB available)

Additional context

Add any other context about the problem here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions