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

Only load versioned libcufile #548

Merged
merged 4 commits into from
Apr 27, 2023

Conversation

jakirkham
Copy link
Member

Fixes the dlopen logic around libcufile to load either the SOVERSION library or the fully versioned library. This includes logic to handle the missing SOVERSION library on older CUDA versions. Drops loading the stub library, which typically only shows up in development environments.


Fixes #504

Borrows from PR ( rapidsai/cudf#13210 ) and PR ( rapidsai/kvikio#203 ). Also adapts this logic to cuCIM ( rapidsai/kvikio#141 )

@jakirkham jakirkham requested a review from a team as a code owner April 26, 2023 20:29
@jakirkham jakirkham added bug Something isn't working non-breaking Introduces a non-breaking change labels Apr 26, 2023
@jakirkham
Copy link
Member Author

@gigony could you please review?

@jakirkham jakirkham force-pushed the fix_dlopen_libcufile branch from ebfbe08 to c3f3f7d Compare April 26, 2023 20:43
Copy link
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

Changes look aligned with those in KvikIO and cuDF. 👍

gds/src/cufile_stub.cpp Outdated Show resolved Hide resolved
@jakirkham jakirkham force-pushed the fix_dlopen_libcufile branch 2 times, most recently from 5b480ea to ddb0e6b Compare April 26, 2023 21:21
Also include workaround for CUDA 11 packaging missing the SOVERSION
library in some cases.
@jakirkham jakirkham force-pushed the fix_dlopen_libcufile branch from ddb0e6b to bc322c8 Compare April 26, 2023 21:37
Copy link
Contributor

@grlee77 grlee77 left a comment

Choose a reason for hiding this comment

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

Nice, thanks for handling this @jakirkham and @bdice

@jakirkham jakirkham requested a review from gigony April 26, 2023 22:11
Copy link
Contributor

@gigony gigony left a comment

Choose a reason for hiding this comment

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

Thanks @jakirkham . Looks great to me! Thank you for adding this!

@jakirkham
Copy link
Member Author

jakirkham commented Apr 26, 2023

Am seeing some test failures due to test_disambiguate_2d on Python 3.10 that appear unrelated to this change. @grlee77 could you please take a look at these?

FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[100-100] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[100--100] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[100-350] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[100--350] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[-100-100] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[-100--100] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[-100-350] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[-100--350] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[350-100] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[350--100] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[350-350] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[350--350] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[-350-100] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[-350--100] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[-350-350] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3
FAILED src/cucim/skimage/registration/tests/test_phase_cross_correlation.py::test_disambiguate_2d[-350--350] - AssertionError: 
Items are not equal:
 ACTUAL: 2
 DESIRED: 3

@grlee77
Copy link
Contributor

grlee77 commented Apr 27, 2023

Okay, I diagnosed the CI failure and it is due to a recent change in imageio that is causing the "eagle" image we are using to be loaded as RGB instead of grayscale.

The test will pass even with the most recent imageio if it is modified with an additional if statement guarding against the image being loaded as RGB instead of grayscale.

    image = cp.array(eagle()[500:, 900:])  # use a highly textured image region
    # revert to grayscale if a recent imageio caused the image to be loaded as RGB
    if image.ndim == 3:
        image = image[..., 0]

@grlee77
Copy link
Contributor

grlee77 commented Apr 27, 2023

I was looking into this failure in #549 and can clean that up to only have a necessary fix.

@jakirkham
Copy link
Member Author

Thanks Greg! 🙏

@jakirkham
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 8cbbe8f into rapidsai:branch-23.06 Apr 27, 2023
@jakirkham jakirkham deleted the fix_dlopen_libcufile branch April 27, 2023 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cuCIM: Need to canonicalize dlopen'd names
4 participants