-
Notifications
You must be signed in to change notification settings - Fork 5
feat(ibverbs): improve Device and DeviceList implementation
#50
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
Conversation
dragonJACson
commented
Feb 21, 2025
- Define custom Error type for getting device list and open device.
- Provide the ability to access Device from DeviceList using index.
- Define a trait for accessing DeviceInfo, implement it for both Device and DeviceContext.
- More unit-tests.
72e5510 to
49065c6
Compare
|
|
||
| /// Trait for common device information access | ||
| pub trait DeviceInfo { | ||
| /// Returns the name of the device, for example, `mlx5_0` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@FujiZ Do you think return an empty String when device name is NULL would be a better solution? I think it would make life easier.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. Theoretically NULL is different from a NULL-ternimated empty string, but the users usually do not care about the difference.
aff5c05 to
74ba624
Compare
Codecov ReportAttention: Patch coverage is
|
1. Define custom Error type for getting device list and open device. 2. Provide the ability to access Device from DeviceList using index. 3. Define a trait for accessing DeviceInfo, implement it for both Device and DeviceContext. 4. More unit-tests. Signed-off-by: Luke Yue <lukedyue@gmail.com>
Signed-off-by: Luke Yue <lukedyue@gmail.com>
74ba624 to
118ba81
Compare
Device and DeviceList implementation