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

Device support GetP2PStatus #23

Closed
wants to merge 0 commits into from
Closed

Device support GetP2PStatus #23

wants to merge 0 commits into from

Conversation

fourhu
Copy link

@fourhu fourhu commented Feb 4, 2024

I wanted to use the GetP2PStatus method in the Device of the go-nvlib package, but I couldn't find it, so I added support.

@fourhu fourhu force-pushed the main branch 3 times, most recently from 2978b3d to ae54ed1 Compare February 4, 2024 11:18
Copy link
Member

@elezar elezar left a comment

Choose a reason for hiding this comment

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

Looks good in general.

Minor formatting comments.

@@ -68,6 +68,7 @@ type Device interface {
IsMigDeviceHandle() (bool, Return)
RegisterEvents(uint64, EventSet) Return
SetMigMode(Mode int) (Return, Return)
GetP2PStatus(Device, GpuP2PCapsIndex) (GpuP2PStatus, Return)
Copy link
Member

Choose a reason for hiding this comment

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

Please sort the functions in the interface alphabetically.

@@ -195,6 +195,16 @@ func (d nvmlDevice) GetTopologyCommonAncestor(o Device) (GpuTopologyLevel, Retur
return GpuTopologyLevel(l), Return(r)
}

func (d nvmlDevice) GetP2PStatus(o Device, idx GpuP2PCapsIndex) (GpuP2PStatus, Return) {
Copy link
Member

Choose a reason for hiding this comment

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

Missing a docstring.

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.

2 participants