-
Notifications
You must be signed in to change notification settings - Fork 179
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
chore: gpu cleanup #1704
base: main
Are you sure you want to change the base?
chore: gpu cleanup #1704
Conversation
maryamtahhan
commented
Aug 19, 2024
•
edited
Loading
edited
- remove init() functions in gpu devices - change to dynamic device registration.
- remove custom gpu tags from the Makefile with the exception of habana (libhlml.go cgo implementation in vendor directory is problematic) so that all device implementations are built in.
- add missing copyright tags
- cleanup dcgm, nvml, and habana globals
🤖 SeineSailor Here is a concise summary of the pull request changes: Summary: The "chore: gpu cleanup" pull request refactors and cleans up GPU-related code, centralizing GPU configuration and updating accelerator interfaces. Key changes include:
Impact: These internal cleanups do not affect the external interface or behavior of the code. However, developers should be aware of the updated import path and altered function signatures, which may impact dependent code. Observations/Suggestions:
|
7989ce0
to
2e14406
Compare
ifeq ($(shell ldconfig -p | grep -q libnvml_injection.so && echo exists),exists) | ||
GPU_TAGS := nvml | ||
endif | ||
ifeq ($(shell ldconfig -p | grep -q libdcgm.so && echo exists),exists) |
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.
@rootfs is it ok to remove the dcgm library check?
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 is removing the GPU_TAGS := dcgm
meaning the dcgm and NVML GPU code will be built into Kepler by default. The device plugins/gpu code checks at runtime for the libraries and don't run if the library doesn't exist.
The only reason I kept the HABANA tag is because there are issues building habana if the library doesn't exist on the system because of their cgo dependency
will rebase once #1788 is merged |
bba5100
to
448635e
Compare
Cleanup the init() calls in the gpu code. Remove gpu tags from the Makefile with the exception of habana (as the libhlml.go cgo implementation in vendor directory is problematic if libhlml.so isn't available). Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>
Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>
0b12e73
to
330fe0f
Compare
Tested with Kubeadm :
|
Maybe one improvement would be to not do init twice (once as a registration test then again for the real initialisation), I'm open to suggestion. |
Signed-off-by: Maryam Tahhan <mtahhan@redhat.com>