Skip to content

[CUDA12] Clean up deprecated APIs#91050

Closed
xw285cornell wants to merge 1 commit intopytorch:masterfrom
xw285cornell:export-D41469051
Closed

[CUDA12] Clean up deprecated APIs#91050
xw285cornell wants to merge 1 commit intopytorch:masterfrom
xw285cornell:export-D41469051

Conversation

@xw285cornell
Copy link
Contributor

@xw285cornell xw285cornell commented Dec 17, 2022

See #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

@pytorch-bot pytorch-bot bot added the release notes: sparse release notes category label Dec 17, 2022
@pytorch-bot
Copy link

pytorch-bot bot commented Dec 17, 2022

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/91050

Note: Links to docs will display an error until the docs builds have been completed.

✅ No Failures

As of commit 89cf697:
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41469051

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is pretty much cosmetic (because I was working on the endif stuff similar to #90897). But I'm curious if we will end up in double definition since it's two independent if. So just add it here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@xw285cornell xw285cornell requested review from IvanYashchuk, eqy, malfet, ngimel and xwang233 and removed request for eqy December 20, 2022 00:51
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this would conflict with #91118? I'm fine with landing whatever's fastest to unblock, but let's please coordinate in #91122

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah ok I wasn't aware of #91118. In this case let's land that one

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41469051

Summary:
Pull Request resolved: pytorch#91050

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

Reviewed By: jianyuh

Differential Revision: D41469051

fbshipit-source-id: b4e856717fc48672e7af5d2baba7931a31273c6d
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D41469051

@facebook-github-bot
Copy link
Contributor

@pytorchbot merge

(Initiating merge automatically since Phabricator Diff has merged)

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Dec 22, 2022
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

jeffdaily pushed a commit to ROCm/pytorch that referenced this pull request Jun 1, 2023
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
jeffdaily added a commit to ROCm/pytorch 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 <[email protected]>
Co-authored-by: Xiao Wang <[email protected]>
Co-authored-by: Xiaodong Wang <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request fb-exported Merged release notes: sparse release notes category

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants