Project-HAMi / HAMi

Heterogeneous AI Computing Virtualization Middleware
http://project-hami.io/
Apache License 2.0
957 stars 197 forks source link

Add support for setting libcuda verbosity #563

Open 4gt-104 opened 1 month ago

4gt-104 commented 1 month ago

What type of PR is this? /kind feature

What this PR does / why we need it: Add support for setting LIBCUDA_LOG_LEVEL during admission.

Which issue(s) this PR fixes: Resolves: #544

Special notes for your reviewer: I added a new function, setOrUpdateEnvVar, as I couldn’t find an existing alternative in the source code. However, I believe it should be placed in a more accessible location other than pkg/device/nvidia/device.go.

Does this PR introduce a user-facing change?: Default log level stays the same. Users should upgrade their values.yaml files if they want to change verbosity level.

codecov[bot] commented 1 month ago

Codecov Report

Attention: Patch coverage is 47.05882% with 9 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
pkg/device/nvidia/device.go 47.05% 8 Missing and 1 partial :warning:
Flag Coverage Δ
unittests 27.10% <47.05%> (+0.19%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
pkg/device/nvidia/device.go 33.94% <47.05%> (+2.36%) :arrow_up: