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

【Hackathon 5th No.45】convert torch.cuda.get_device_name and torch.cuda.device -part #311

Merged
merged 6 commits into from
Dec 5, 2023

Conversation

longranger2
Copy link
Contributor

@longranger2 longranger2 commented Oct 6, 2023

PR Docs

PaddlePaddle/docs#6217

PR APIs

  • convert torch.cuda.get_device_name
  • convert torch.cuda.device

torch.cuda.get_device_name的文档 get_device_name

@paddle-bot
Copy link

paddle-bot bot commented Oct 6, 2023

Thanks for your contribution!

Copy link
Collaborator

@zhwesky2010 zhwesky2010 left a comment

Choose a reason for hiding this comment

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

由于CI只支持CPU,GPU的API,需要把本地测试结果截图贴上来

@@ -4400,6 +4400,16 @@
"device": "device"
}
},
"torch.cuda.get_device_name": {
Copy link
Collaborator

Choose a reason for hiding this comment

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

这两个API返回的结果是一致的吗?看起来properties包含额外的信息

Copy link
Contributor Author

Choose a reason for hiding this comment

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

重新修改好了

@zhwesky2010
Copy link
Collaborator

PR Docs

PaddlePaddle/docs#6217

PR APIs

看起来并没有完成torch.cuda.device的内容?

@longranger2
Copy link
Contributor Author

PR Docs

PaddlePaddle/docs#6217

PR APIs

看起来并没有完成torch.cuda.device的内容?

是的,还没有完成

result = None
if torch.cuda.is_available():
current_device = torch.cuda.current_device()
result = torch.cuda.get_device_name(current_device)
Copy link
Collaborator

Choose a reason for hiding this comment

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

单测本地运行截图有吗

Copy link
Contributor Author

Choose a reason for hiding this comment

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

image

@luotao1 luotao1 changed the title 【Hackathon 5th No.45】convert torch.cuda.get_device_name and torch.cuda.device 【Hackathon 5th No.45】convert torch.cuda.get_device_name and torch.cuda.device -part Dec 4, 2023
@zhwesky2010 zhwesky2010 merged commit 048563a into PaddlePaddle:master Dec 5, 2023
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor External developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants