Fix missing NVML_ENABLED guards around nvml.h includes#6255
Open
JanuszL wants to merge 1 commit intoNVIDIA:mainfrom
Open
Fix missing NVML_ENABLED guards around nvml.h includes#6255JanuszL wants to merge 1 commit intoNVIDIA:mainfrom
JanuszL wants to merge 1 commit intoNVIDIA:mainfrom
Conversation
Collaborator
|
CI MESSAGE: [46231354]: BUILD STARTED |
Contributor
Greptile SummaryThis PR fixes build failures on NVML-less platforms (e.g., Tegra CUDA 12.6) by wrapping five unconditional
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Compiler invocation] --> B{NVML_ENABLED\ndefined?}
B -- Yes --> C[Include dali/util/nvml.h]
B -- No --> D[Skip nvml.h include]
C --> E[nvml:: APIs available]
D --> F[nvml:: APIs unavailable\ne.g. Tegra CUDA 12.6]
E --> G[NVML code paths active\nin guarded blocks]
F --> H[Fallback code paths active\ne.g. cuDriverGetVersion]
G --> I[Build succeeds on\nNVML-enabled platforms]
H --> J[Build succeeds on\nNVML-less platforms]
Last reviewed commit: 5db1732 |
Collaborator
|
CI MESSAGE: [46231354]: BUILD FAILED |
- Guards all unconditional includes of dali/util/nvml.h with #if NVML_ENABLED, consistent with thread_pool.cc, worker_thread.h, gds_mem_test.cu and malloc_resource.cc. Fixes build failures on platforms where nvml.h is not available (e.g. Tegra CUDA 12.6). - Adds direct include of dali/core/common.h in new_thread_pool.cc to make CPU_ONLY_DEVICE_ID available without relying on the transitive include chain through nvml.h (broken when NVML_ENABLED=0). Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
Collaborator
|
CI MESSAGE: [46242365]: BUILD STARTED |
mzient
approved these changes
Mar 16, 2026
szalpal
approved these changes
Mar 16, 2026
Collaborator
|
CI MESSAGE: [46242365]: BUILD FAILED |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#if NVML_ENABLED, consistent with thread_pool.cc, worker_thread.h,
gds_mem_test.cu and malloc_resource.cc. Fixes build failures on
platforms where nvml.h is not available (e.g. Tegra CUDA 12.6).
Category:
Bug fix (non-breaking change which fixes an issue)
Description:
#if NVML_ENABLED, consistent with thread_pool.cc, worker_thread.h,
gds_mem_test.cu and malloc_resource.cc. Fixes build failures on
platforms where nvml.h is not available (e.g. Tegra CUDA 12.6).
Additional information:
Affected modules and functionalities:
Key points relevant for the review:
Tests:
Checklist
Documentation
DALI team only
Requirements
REQ IDs: N/A
JIRA TASK: N/A