Skip to content
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

Fix CUDA 10.0 compilation #2917

Merged
merged 2 commits into from
May 5, 2021
Merged

Conversation

JanuszL
Copy link
Contributor

@JanuszL JanuszL commented Apr 30, 2021

  • moves isHWDecoderSupported to CUDA 11 ifdef as it uses HasHwDecoder
    function not available for CUDA 10

Signed-off-by: Janusz Lisiecki jlisiecki@nvidia.com

Why we need this PR?

Pick one, remove the rest

  • It fixes a CUDA 10.0 compilation

What happened in this PR?

Fill relevant points, put NA otherwise. Replace anything inside []

  • What solution was applied:
    moves isHWDecoderSupported to CUDA 11 ifdef as it uses HasHwDecoder function not available for CUDA 10
  • Affected modules and functionalities:
    nvml.h
  • Key points relevant for the review:
    NA
  • Validation and testing:
    CI build for CUDA 10.0
  • Documentation (including examples):
    NA

JIRA TASK: [NA]

@JanuszL
Copy link
Contributor Author

JanuszL commented Apr 30, 2021

!build

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2324287]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2324292]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2324292]: BUILD FAILED

- moves isHWDecoderSupported to CUDA 11 ifdef as it uses HasHwDecoder
  function not available for CUDA 10

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2324541]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2324543]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2324287]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2324543]: BUILD PASSED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2324541]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2324541]: BUILD PASSED

@mzient mzient changed the title Fixe CUDA 10.0 compilation Fix CUDA 10.0 compilation May 5, 2021
@@ -74,7 +74,7 @@ class nvJPEGDecoder : public Operator<MixedBackend>, CachedDecoderImpl {
nvjpeg2k_thread_(1,
spec.GetArgument<int>("device_id"),
spec.GetArgument<bool>("affine")) {
#if NVJPEG_VER_MAJOR >= 11
#if NVJPEG_VER_MAJOR >= 11 && NVJPEG_VER_MINOR >= 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Technically this is wrong, because for 12.0 the condition would fail.

Suggested change
#if NVJPEG_VER_MAJOR >= 11 && NVJPEG_VER_MINOR >= 1
#if NVJPEG_VER_MAJOR > 11 || (NVJPEG_VER_MAJOR == 11 && NVJPEG_VER_MINOR >= 1)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

@@ -558,7 +558,7 @@ class nvJPEGDecoder : public Operator<MixedBackend>, CachedDecoderImpl {

// only when we have ROI info check if nvjpegDecodeBatchedSupportedEx supports it
if (nvjpeg_decode) {
#if NVJPEG_VER_MAJOR >= 11
#if NVJPEG_VER_MAJOR >= 11 && NVJPEG_VER_MINOR >= 1
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#if NVJPEG_VER_MAJOR >= 11 && NVJPEG_VER_MINOR >= 1
#if NVJPEG_VER_MAJOR > 11 || (NVJPEG_VER_MAJOR == 11 && NVJPEG_VER_MINOR >= 1)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed

Signed-off-by: Janusz Lisiecki <jlisiecki@nvidia.com>
@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2336625]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2336626]: BUILD STARTED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2336626]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2336625]: BUILD FAILED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2336625]: BUILD PASSED

@dali-automaton
Copy link
Collaborator

CI MESSAGE: [2336626]: BUILD PASSED

@JanuszL JanuszL merged commit d18792a into NVIDIA:master May 5, 2021
@JanuszL JanuszL deleted the fix_cuda10_compilation branch May 5, 2021 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants