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

conditionally enable hipsparse const descriptors for version >= 2.4.0 #1217

Conversation

jeffdaily
Copy link
Collaborator

Fixes SWDEV-387879, but now using hipsparse version 2.4.0.

@jeffdaily jeffdaily changed the title Rocm5.6 internal testing hipsparse const descriptors conditionally enable hipsparse const descriptors for version >= 2.4.0 Apr 17, 2023
@jeffdaily
Copy link
Collaborator Author

This is a good candidate for a squash and merge. It's the same as #1215 but with the hipsparse version condition updated to 2.4.0.

@jeffdaily
Copy link
Collaborator Author

Lots of failures in the CI. But this PR could only be the cause of build failures, not test failures. Can we merge?

@jithunnair-amd jithunnair-amd merged commit 2480b7e into rocm5.6_internal_testing Apr 19, 2023
pruthvistony pushed a commit that referenced this pull request May 23, 2023
…#1217)

* conditionally enable hipsparse const descriptors

* update hipsparse const API version condition to 2.4.0
jeffdaily added a commit that referenced this pull request Jun 1, 2023
…#1217)

* conditionally enable hipsparse const descriptors

* update hipsparse const API version condition to 2.4.0
jeffdaily added a commit that referenced this pull request Jun 1, 2023
…#1217)

* conditionally enable hipsparse const descriptors

* update hipsparse const API version condition to 2.4.0
jeffdaily added a commit that referenced this pull request Jun 1, 2023
…, backport to release/1.13 (#1233)

* Update cuSPARSE usage for CUDA 12.0 (pytorch#90765)

cuSPARSE v12.0 has started to use const pointers for the descriptors, from `cusparse.h` (documentation is incorrect):
```cpp
typedef struct cusparseSpVecDescr const* cusparseConstSpVecDescr_t;
typedef struct cusparseDnVecDescr const* cusparseConstDnVecDescr_t;
typedef struct cusparseSpMatDescr const* cusparseConstSpMatDescr_t;
typedef struct cusparseDnMatDescr const* cusparseConstDnMatDescr_t;
```
Changing also the function signature for the corresponding destructors to accept a const pointer. This PR adds `ConstCuSparseDescriptorDeleter` working with `cusparseStatus_t (*destructor)(const T*)`.

Some algorithm enums were deprecated during CUDA 11 and removed in CUDA 12, I replaced the following occurences
```
CUSPARSE_CSRMM_ALG1 -> CUSPARSE_SPMM_CSR_ALG1
CUSPARSE_COOMM_ALG1 -> CUSPARSE_SPMM_COO_ALG1
CUSPARSE_COOMM_ALG2 -> CUSPARSE_SPMM_COO_ALG2
```

Pull Request resolved: pytorch#90765
Approved by: https://github.com/cpuhrsch

* [CUDA 12] Fix the endif guard position for cusparse const descriptors (pytorch#90897)

[CUDA 12] Fix the endif guard position for cusparse const descriptors

Related pytorch#90765
Pull Request resolved: pytorch#90897
Approved by: https://github.com/IvanYashchuk

* [CUDA12] Clean up deprecated APIs (pytorch#91050)

See pytorch#91122
Summary:
Some APIs are deprecated in newer version of CUDA.
* cudaGraphInstantiate:
From:
```
cudaGraphInstantiate ( cudaGraphExec_t* pGraphExec, cudaGraph_t graph, cudaGraphNode_t* pErrorNode, char* pLogBuffer, size_t bufferSize )
```
To
```
__host__​cudaError_t cudaGraphInstantiate ( cudaGraphExec_t* pGraphExec, cudaGraph_t graph, unsigned long long flags = 0 )
```
* cudaProfilerInitialize: deprecated in cuda 11 and removed in cuda 12

Test Plan: GH CI

Differential Revision: D41469051

Pull Request resolved: pytorch#91050
Approved by: https://github.com/jianyuh

* conditionally enable hipsparse const descriptors for version >= 2.4.0 (#1217)

* conditionally enable hipsparse const descriptors

* update hipsparse const API version condition to 2.4.0

---------

Co-authored-by: Ivan Yashchuk <ivan.yashchuk@aalto.fi>
Co-authored-by: Xiao Wang <24860335+xwang233@users.noreply.github.com>
Co-authored-by: Xiaodong Wang <xdwang@meta.com>
pruthvistony pushed a commit that referenced this pull request Sep 11, 2023
…#1217)

* conditionally enable hipsparse const descriptors

* update hipsparse const API version condition to 2.4.0
jeffdaily added a commit that referenced this pull request Sep 29, 2023
…#1217)

* conditionally enable hipsparse const descriptors

* update hipsparse const API version condition to 2.4.0
pruthvistony pushed a commit that referenced this pull request Oct 11, 2023
…#1217)

* conditionally enable hipsparse const descriptors

* update hipsparse const API version condition to 2.4.0
jeffdaily added a commit that referenced this pull request Nov 17, 2023
…#1217)

* conditionally enable hipsparse const descriptors

* update hipsparse const API version condition to 2.4.0
jeffdaily added a commit that referenced this pull request Jan 5, 2024
…#1217)

* conditionally enable hipsparse const descriptors

* update hipsparse const API version condition to 2.4.0
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

Successfully merging this pull request may close these issues.

None yet

2 participants