-
Notifications
You must be signed in to change notification settings - Fork 70
[REVIEW] Feat: PR #2 Add GPU-accelerated TIFF decoding via nvImageCodec v0.6.0 for digital pathology #978
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
[REVIEW] Feat: PR #2 Add GPU-accelerated TIFF decoding via nvImageCodec v0.6.0 for digital pathology #978
Conversation
|
/ok to test d173ee9 |
17e6bb5 to
cee8f57
Compare
|
/ok to test 5d8ae8c |
|
/ok to test ecd8e10 |
|
/ok to test cdb1c26 |
|
/ok to test 9a56b59 |
|
/ok to test 082014a |
|
/ok to test ad4d5af |
|
/ok to test 07979f8 |
|
/ok to test 367a4f5 |
|
/ok to test 124307c |
|
/ok to test dea5b27 |
|
/ok to test 1eb30d0 |
|
/ok to test 27fbe30 |
|
/ok to test b8ae2dd |
|
/ok to test 4360b5c |
grlee77
left a comment
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.
Thanks for working on this cuslide2 plugin. It is great to see all the various 3rdparty library functionality being replaced with GPU-accelerated solutions from nvimgcodec!
I have left some minor comments around dependencies, licenses and stray comments. I have now reviewed most files aside from the core new nvimgcodec*.* ones. If you have already gotten good feedback on those from the nvimgcodec team, Gigon or others, please do not hold off merging on my account.
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.
It seems that this file can be removed? I see there is already a cucim.kit.cuslide2-config.cmake.in and the
cucim.kit.cuslide2/CMakeLists.txt uses that one
${CMAKE_CURRENT_SOURCE_DIR}/cmake/${CUCIM_PLUGIN_NAME}-config.cmake.inThere 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.
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.
Can this file be removed like SuperBuildUtils.cmake was? (It seems to be identical to the one in the cpp/plubins/cucuim.kit.cuslide/cmake/modules folder)
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.
thank you @grlee77 - this will be addressed in the third PR
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.
These test scripts are okay for this MR, but let's make a future task to move the testing into automated cases that will be run by pytest on CI. (e.g. move out of this folder and put the tests somewhere under python/cucim/tests/)
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.
thank you @grlee77 - yes, we added sperataley because they use Aperio SVS and Philips TIFF images and , AFAIK the tests in cucim use synthetic data. But I agree, we should make it part of the test suite
Co-authored-by: Gregory Lee <[email protected]>
Co-authored-by: Gregory Lee <[email protected]>
|
/ok to test 5124f91 |
|
The style check is trying to change the license file copyright headers in a way that is inaccurate. Here is the change it proposes: diff --git a/cpp/plugins/cucim.kit.cuslide2/benchmarks/main.cpp b/cpp/plugins/cucim.kit.cuslide2/benchmarks/main.cpp
index 45dacba..de11f8a 100644
--- a/cpp/plugins/cucim.kit.cuslide2/benchmarks/main.cpp
+++ b/cpp/plugins/cucim.kit.cuslide2/benchmarks/main.cpp
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: Copyright (c) 2020-2025, NVIDIA CORPORATION.
+ * SPDX-FileCopyrightText: Copyright (c) 2020-2022, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/
diff --git a/cpp/plugins/cucim.kit.cuslide2/tests/main.cpp b/cpp/plugins/cucim.kit.cuslide2/tests/main.cpp
index 7d9541b..10ded7e 100644
--- a/cpp/plugins/cucim.kit.cuslide2/tests/main.cpp
+++ b/cpp/plugins/cucim.kit.cuslide2/tests/main.cpp
@@ -1,5 +1,5 @@
/*
- * SPDX-FileCopyrightText: Copyright (c) 2020-2025, NVIDIA CORPORATION.
+ * SPDX-FileCopyrightText: Copyright (c) 2020, NVIDIA CORPORATION.
* SPDX-License-Identifier: Apache-2.0
*/However both of these files came from How can we fix this? |
Co-authored-by: Gregory Lee <[email protected]>
Co-authored-by: Gregory Lee <[email protected]>
Co-authored-by: Gregory Lee <[email protected]>
|
/ok to test 6d2767d |
This is because it's detecting that those files were copied from elsewhere in the repository with no modifications, so it's deferring to the old files' copyright updates. Making a small change to the contents of the file (outside of the copyright header) should fix it if desired. Otherwise, since it's effectively the same file, it should have the same copyright dates. |
|
/ok to test 2f22839 |
|
Let's address the style check as Kyle noted above ( #978 (comment) ) as the rest of the CI won't run without that |
|
/ok to test 2f22839 |
@cdinea, there was an error processing your request: See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/2/ |
|
/ok to test 75515df |
|
/merge |
|
Thanks everyone! 🙏 Remaining items will be addressed in the 3rd PR in this series: #983 |
cuslide2: GPU-Accelerated decoding via nvImageCodec v0.6.0
Overview
cucim.kit.cuslide2plugin implementing GPU-accelerated whole-slide imaging (WSI) decoding using nvImageCodec v0.6.0. Replaces CPU-based decoders (libjpeg-turbo, OpenJPEG, libtiff) with GPU equivalentsVendor Support:
Key Features
cucim.kit.cuslideBuild Instructions
Create Conda Environment:
Build cuslide2 Plugin:
Install Python Package:
# Install in editable mode for development python -m pip install --editable python/cucimTesting
Unit Tests (26 tests)
cd python/cucim python -m pytest tests/unit/clara/test_tiff_read_region.py -vExpected Output:
================================== test session starts ================================== platform linux -- Python 3.13.9, pytest-8.4.2, pluggy-1.6.0 -- /home/cdinea/miniconda3/envs/cucimcuda/bin/python cachedir: .pytest_cache rootdir: /home/cdinea/Downloads/cucim_pr2/branchremote/cucim/python/cucim configfile: pyproject.toml plugins: cov-7.0.0, xdist-3.8.0, lazy-fixtures-1.4.0 collected 26 items tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_inner[testimg_tiff_stripe_32x24_16_jpeg] PASSED [ 3%] tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_boundary[testimg_tiff_stripe_32x24_16_jpeg] PASSED [ 7%] tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_outside[testimg_tiff_stripe_32x24_16_jpeg] PASSED [ 11%] tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_inner[testimg_tiff_stripe_32x24_16_deflate] PASSED [ 15%] tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_boundary[testimg_tiff_stripe_32x24_16_deflate] PASSED [ 19%] tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_outside[testimg_tiff_stripe_32x24_16_deflate] PASSED [ 23%] tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_inner[testimg_tiff_stripe_32x24_16_raw] PASSED [ 26%] tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_boundary[testimg_tiff_stripe_32x24_16_raw] PASSED [ 30%] tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_outside[testimg_tiff_stripe_32x24_16_raw] PASSED [ 34%] tests/unit/clara/test_tiff_read_region.py::test_tiff_outside_of_resolution_level[testimg_tiff_stripe_4096x4096_256_jpeg] PASSED [ 38%] tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_multiresolution[testimg_tiff_stripe_4096x4096_256_jpeg] PASSED [ 42%] tests/unit/clara/test_tiff_read_region.py::test_region_image_level_data[testimg_tiff_stripe_4096x4096_256_jpeg] PASSED [ 46%] tests/unit/clara/test_tiff_read_region.py::test_region_image_dtype[testimg_tiff_stripe_4096x4096_256_jpeg] PASSED [ 50%] tests/unit/clara/test_tiff_read_region.py::test_tiff_iterator[testimg_tiff_stripe_4096x4096_256_jpeg] PASSED [ 53%] tests/unit/clara/test_tiff_read_region.py::test_tiff_outside_of_resolution_level[testimg_tiff_stripe_4096x4096_256_deflate] PASSED [ 57%] tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_multiresolution[testimg_tiff_stripe_4096x4096_256_deflate] PASSED [ 61%] tests/unit/clara/test_tiff_read_region.py::test_region_image_level_data[testimg_tiff_stripe_4096x4096_256_deflate] PASSED [ 65%] tests/unit/clara/test_tiff_read_region.py::test_region_image_dtype[testimg_tiff_stripe_4096x4096_256_deflate] PASSED [ 69%] tests/unit/clara/test_tiff_read_region.py::test_tiff_iterator[testimg_tiff_stripe_4096x4096_256_deflate] PASSED [ 73%] tests/unit/clara/test_tiff_read_region.py::test_tiff_outside_of_resolution_level[testimg_tiff_stripe_4096x4096_256_raw] PASSED [ 76%] tests/unit/clara/test_tiff_read_region.py::test_tiff_stripe_multiresolution[testimg_tiff_stripe_4096x4096_256_raw] PASSED [ 80%] tests/unit/clara/test_tiff_read_region.py::test_region_image_level_data[testimg_tiff_stripe_4096x4096_256_raw] PASSED [ 84%] tests/unit/clara/test_tiff_read_region.py::test_region_image_dtype[testimg_tiff_stripe_4096x4096_256_raw] PASSED [ 88%] tests/unit/clara/test_tiff_read_region.py::test_tiff_iterator[testimg_tiff_stripe_4096x4096_256_raw] PASSED [ 92%] tests/unit/clara/test_tiff_read_region.py::test_array_interface_support PASSED [ 96%] tests/unit/clara/test_tiff_read_region.py::test_cuda_array_interface_support PASSED [100%] ================================== 26 passed in 4.04s ===================================Aperio SVS Validation
Tests:
Philips TIFF Validation
Tests:
Known Limitations
Migration Guide
No code changes required for existing cuCIM users: