-
Notifications
You must be signed in to change notification settings - Fork 109
Add NVSwitch device ID for p6 instance type #2987
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
| nvswitch_check_p4 = shell_out("lspci -d 10de:1af1 | wc -l") | ||
| nvswitch_check_p5 = shell_out("lspci -d 10de:22a3 | wc -l") | ||
| nvswitch_check_p4.stdout.strip.to_i + nvswitch_check_p5.stdout.strip.to_i | ||
| # NVSwitch device id is 10de:2901 for P6 instance |
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.
Where did we take the device id 10de:2901 from?
Is there some public reference that we can link to the PR?
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.
This link provides the step to get this ID https://nvidia.custhelp.com/app/answers/detail/a_id/2040/~/identifying-the-graphics-card-model-and-device-id-in-a-pc
| nvswitch_check_p4.stdout.strip.to_i + nvswitch_check_p5.stdout.strip.to_i | ||
| # NVSwitch device id is 10de:2901 for P6 instance | ||
| nvswitch_device_ids = ['10de:1af1', '10de:22a3', '10de:2901'] | ||
| nvswitch_device_ids.sum { |id| shell_out("lspci -d #{id} | wc -l").stdout.strip.to_i } |
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.
Why are we summing up all the number of switches rather than returning the specific number for the specific instance type?
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.
These device Id's are based on the GPU being used, and the solution is irrespective of the instance type as we use device ID of GPU's for which we know have NVswitches
| end | ||
|
|
||
| # Get number of nv switches | ||
| def get_nvswitches |
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.
Can we cover this change within the fabric manager spec test?
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.
will try to see if I can for this function as a Unit test
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.
Thanks for adding the unit test!
07dfcb0 to
1e9a845
Compare
2951aac to
b91084f
Compare
Description of changes
Steps for Device ID: https://nvidia.custhelp.com/app/answers/detail/a_id/2040/~/identifying-the-graphics-card-model-and-device-id-in-a-pc
Tests
References
Checklist
developadd the branch name as prefix in the PR title (e.g.[release-3.6]).Please review the guidelines for contributing and Pull Request Instructions.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.