Skip to content

ci: Guard dynamic CUDART isolation - #1360

Open
bibrakc wants to merge 1 commit into
aws:masterfrom
bibrakc:ci/cudart-dynamic-guard
Open

ci: Guard dynamic CUDART isolation#1360
bibrakc wants to merge 1 commit into
aws:masterfrom
bibrakc:ci/cudart-dynamic-guard

Conversation

@bibrakc

@bibrakc bibrakc commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Description of changes:

The default CUDA build links CUDART statically, which allows accidental CUDA Runtime calls in the core plugin to pass the existing CI matrix. Binary packages use --enable-cudart-dynamic and require the plugin DSOs to avoid a link-time dependency on the CUDA Runtime version used to build them.

Add one dynamic-CUDART variant to the Amazon Linux matrix while keeping all existing default builds. Check the resulting core DSOs for a direct libcudart dependency or unresolved CUDA Runtime symbols so this class of regression fails in plugin CI instead of downstream packaging.

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@bibrakc
bibrakc requested a review from a team as a code owner August 19, 2026 12:27
@bibrakc
bibrakc requested a review from hershys-aws August 19, 2026 12:54
Comment thread .github/workflows/distcheck.yaml Outdated
Comment on lines +30 to +34
build-type:
- release
- debug
cudart:
- default

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This should be a build types because that what it is. We just need to test in CI accordingly.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Didn't want to multiply the test dimension and simply introduce a single test row to catch any cuda runtime api usage. Can you explain a little more about it being in built-type? To be consistent with the convention?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think the correct approach is establishing the build type with the possible build options (look at the autotools configure options we have set) and then executing only what we need. If you are worried about build times blowing up I think we can cut OS's for things like LTTNG/NVTX. Those are mainly for internal debugging use so we cant limit those. This way we can still get our coverage on OS's but be intentional about it.

Comment thread .github/workflows/distcheck.yaml Outdated
runs-on: ubuntu-latest
container: ghcr.io/${{ github.repository }}/aws-ofi-nccl-al2023:${{ matrix.sdk }}-efa${{ matrix.efainstaller }}
name: al2023/${{ matrix.sdk }}/efa@${{ matrix.efainstaller }}/${{ matrix.build-type }}
name: al2023/${{ matrix.sdk }}/efa@${{ matrix.efainstaller }}/${{ matrix.build-type }}${{ matrix.cudart == 'dynamic' && '/cudart-dynamic' || '' }}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

don't be silent about the cudart config in the non-dynamic case.

@bibrakc bibrakc Aug 19, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have named the non-dynamic as well now it shows like:

al2023/cuda/efa@latest/release/cudart-static

and

al2023/cuda/efa@latest/release/cudart-dynamic

However, I didn't put any names in the other stages such as ubuntu and/or neuron. Please let me know if its ok?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Well, I don't understand why we're only running this test on one OS....

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I didn't want to multiply the test matrix. However, I have now added the check in all Ubuntu OSes as well but for only one stage that is gcc/release. Please let me know if we really need to multiply it across the test matrix. There will be around 150 more checks.

Comment thread .github/workflows/distcheck.yaml Outdated
@bibrakc
bibrakc force-pushed the ci/cudart-dynamic-guard branch 3 times, most recently from 72757c6 to 03cbb96 Compare August 19, 2026 18:33
rauteric
rauteric previously approved these changes Aug 19, 2026
The default CUDA build links CUDART statically, which allows accidental
CUDA Runtime calls in the core plugin to pass the existing CI matrix.
Binary packages use --enable-cudart-dynamic and require the plugin DSOs
to avoid a link-time dependency on the CUDA Runtime version used to
build them.

Exercise both CUDART modes across every CUDA combination in the Amazon
Linux and Ubuntu matrices while excluding dynamic CUDART from Neuron
builds.  Label each CUDA job with its CUDART mode and check the
resulting core DSOs for a direct libcudart dependency so this class of
regression fails in plugin CI instead of downstream packaging.

Signed-off-by: Bibrak Qamar Chandio <bibracha@amazon.com>
@bibrakc
bibrakc force-pushed the ci/cudart-dynamic-guard branch from e10b026 to ae850c8 Compare August 20, 2026 16:56
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.

4 participants