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

[ROCM] add is_compiled_with_rocm api, test=develop #33043

Merged
merged 1 commit into from
May 27, 2021

Conversation

qili93
Copy link
Contributor

@qili93 qili93 commented May 21, 2021

PR types

New features

PR changes

APIs

Describe

  1. add new api of "is_compiled_with_rocm"
>>> paddle.is_compiled_with_rocm()
True
>>> paddle.is_compiled_with_cuda()
True
>>> paddle.is_compiled_with_xpu()
False
>>> paddle.is_compiled_with_npu()
False
  1. support CUDA_HOME in ROCM env

PaddleNLP used CUDA_HOME in model:
https://github.com/PaddlePaddle/PaddleNLP/blob/develop/paddlenlp/ops/ext_utils.py

>>> from paddle.utils.cpp_extension.cpp_extension import CUDA_HOME
>>> print(CUDA_HOME)
/opt/rocm
>>> from paddle.utils.cpp_extension.cpp_extension import ROCM_HOME
>>> print(ROCM_HOME)
/opt/rocm

Doc PR: PaddlePaddle/docs#3526

@paddle-bot-old
Copy link

Thanks for your contribution!
Please wait for the result of CI firstly. See Paddle CI Manual for details.

Copy link
Contributor

@chenwhql chenwhql left a comment

Choose a reason for hiding this comment

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

LGTM

@qili93 qili93 requested a review from TCChenlong May 27, 2021 03:32
Copy link
Contributor

@TCChenlong TCChenlong left a comment

Choose a reason for hiding this comment

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

LGTM

@qili93 qili93 requested a review from lanxianghit May 27, 2021 07:10
Copy link
Contributor

@lanxianghit lanxianghit left a comment

Choose a reason for hiding this comment

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

LGTM

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.

4 participants