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

[JOSS REVIEW] Use of deprecated function cusparseScsrmv in CUDA executor #613

Closed
adam-m-jcbs opened this issue Aug 4, 2020 · 5 comments · Fixed by #603
Closed

[JOSS REVIEW] Use of deprecated function cusparseScsrmv in CUDA executor #613

adam-m-jcbs opened this issue Aug 4, 2020 · 5 comments · Fixed by #603
Assignees
Labels
is:bug Something looks wrong. is:confirmed Someone confirmed this issue. mod:cuda This is related to the CUDA module.

Comments

@adam-m-jcbs
Copy link

adam-m-jcbs commented Aug 4, 2020

This issue is part of the functionality aspect of a JOSS review (see #597 )

I have run into a new issue in building CUDA-enabled ginkgo while building. After a successful cmake, an attempt to build with make gives

[  1%] Building CXX object cuda/CMakeFiles/ginkgo_cuda.dir/base/executor.cpp.o
In file included from /home/ajacobs/Reporoot/ginkgo/cuda/base/executor.cpp:43:
/home/ajacobs/Reporoot/ginkgo/cuda/base/cusparse_bindings.hpp: In function ‘void gko::kernels::cuda::cusparse::spmv(cusparseHandle_t, cusparseOperation_t, gko::int32, gko::int32, gko::int32, const float*, cusparseMatDescr_t, const float*, const int32*, const int32*, const float*, const float*, float*)’:
/home/ajacobs/Reporoot/ginkgo/cuda/base/cusparse_bindings.hpp:118:33: error: ‘cusparseScsrmv’ was not declared in this scope; did you mean ‘cusparseSbsrmv’?
  118 | GKO_BIND_CUSPARSE32_SPMV(float, cusparseScsrmv);

I deploy the latest stable CUDA tookit and dev environment, so when I looked at my cusparse header files I confirmed that cusparseScsrmv is no longer provided and was deprecated as mentioned here (section 8.8.).

NVIDIA suggests "use cusparseCsrmvEx() instead."

In the meantime, I will explore workarounds (and welcome suggestions). As CUDA toolkits are made current, however, this will become an issue for more users/systems.

@upsj
Copy link
Member

upsj commented Aug 4, 2020

Thanks for letting us know! Can you provide the exact CUDA version you are using?

@adam-m-jcbs
Copy link
Author

adam-m-jcbs commented Aug 4, 2020

Lightning fast as usual @upsj ! I aspire!

Here is the result of deviceQuery:

/deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

Detected 1 CUDA Capable device(s)

Device 0: "Quadro T2000"
  CUDA Driver Version / Runtime Version          11.0 / 11.0
  CUDA Capability Major/Minor version number:    7.5
  Total amount of global memory:                 3912 MBytes (4101898240 bytes)
  (16) Multiprocessors, ( 64) CUDA Cores/MP:     1024 CUDA Cores
  GPU Max Clock rate:                            1785 MHz (1.78 GHz)
  Memory Clock rate:                             4001 Mhz
  Memory Bus Width:                              128-bit
  L2 Cache Size:                                 1048576 bytes
  Maximum Texture Dimension Size (x,y,z)         1D=(131072), 2D=(131072, 65536), 3D=(16384, 16384, 16384)
  Maximum Layered 1D Texture Size, (num) layers  1D=(32768), 2048 layers
  Maximum Layered 2D Texture Size, (num) layers  2D=(32768, 32768), 2048 layers
  Total amount of constant memory:               65536 bytes
  Total amount of shared memory per block:       49152 bytes
  Total number of registers available per block: 65536
  Warp size:                                     32
  Maximum number of threads per multiprocessor:  1024
  Maximum number of threads per block:           1024
  Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
  Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
  Maximum memory pitch:                          2147483647 bytes
  Texture alignment:                             512 bytes
  Concurrent copy and kernel execution:          Yes with 3 copy engine(s)
  Run time limit on kernels:                     No
  Integrated GPU sharing Host Memory:            No
  Support host page-locked memory mapping:       Yes
  Alignment requirement for Surfaces:            Yes
  Device has ECC support:                        Disabled
  Device supports Unified Addressing (UVA):      Yes
  Device supports Managed Memory:                Yes
  Device supports Compute Preemption:            Yes
  Supports Cooperative Kernel Launch:            Yes
  Supports MultiDevice Co-op Kernel Launch:      Yes
  Device PCI Domain ID / Bus ID / location ID:   0 / 1 / 0
  Compute Mode:
     < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >

deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 11.0, CUDA Runtime Version = 11.0, NumDevs = 1
Result = PASS

Arch's package database defaults to CUDA 11.0.2 (https://www.archlinux.org/packages/community/x86_64/cuda/).

I do suspect it's possible CUDA on my system went from a late 10.x into 11.0 between builds, causing cusparseScsrmv to disappear.

@thoasm
Copy link
Member

thoasm commented Aug 4, 2020

Hello @adam-m-jcbs,
thank you for your feedback. I am assuming you are using CUDA 11 since it is the 'latest stable CUDA toolkit'.
In CUDA 11, a lot of functionality was removed (that we used in Ginkgo). We are currently working on getting it to work with CUDA 11 in the PR #603, but since there are so many changes (and new functions with not ideal documentation), it takes a while to make it work.

@adam-m-jcbs adam-m-jcbs changed the title [JOSS REVIEW] Use of deprecated function cusparseCsrmv in CUDA executor [JOSS REVIEW] Use of deprecated function cusparseScsrmv in CUDA executor Aug 4, 2020
@thoasm
Copy link
Member

thoasm commented Aug 4, 2020

If you are using ArchLinux, then yes, that actually happened to me as well recently.

@yhmtsai yhmtsai mentioned this issue Aug 4, 2020
@tcojean tcojean added is:bug Something looks wrong. is:confirmed Someone confirmed this issue. mod:cuda This is related to the CUDA module. labels Aug 4, 2020
@adam-m-jcbs
Copy link
Author

Thanks for pointing that out, @thoasm . I missed that PR. For the purposes of the functionality review #597 I will downgrade to 10.x and evaluate what was submitted. This issue is more relevant for the future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
is:bug Something looks wrong. is:confirmed Someone confirmed this issue. mod:cuda This is related to the CUDA module.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants