Open
Conversation
The nemotron_ocr_cpp C++ extension was only built on x86_64 runners, causing ModuleNotFoundError on ARM hosts like the DGX Spark. Matrix the build_ocr_cuda job across x86_64 (ubuntu-latest) and aarch64 (ubuntu-24.04-arm) so pip can install the correct platform wheel on either architecture. Made-with: Cursor
charlesbluca
approved these changes
Mar 19, 2026
The upstream nemotron-ocr build script hard-codes -mavx2 (an x86-only SIMD flag) in its C++ extension compile args. On aarch64 runners this causes an immediate compile failure. Add a generic --strip-cflag option to nightly_build_publish.py that removes quoted occurrences of a given compiler flag from upstream Python build scripts after cloning. The workflow now passes --strip-cflag=-mavx2 when building on aarch64. Made-with: Cursor
The upstream nemotron-ocr build script already checks ARCH to skip x86-only SIMD flags (-mavx2) on ARM. Pass ARCH=arm64 via --build-env on the aarch64 leg instead of our regex-based --strip-cflag approach. This removes the _strip_cflags machinery in favour of the upstream's own escape hatch. Made-with: Cursor
Change the dev suffix from YYYYMMDD to YYYYMMDDHHmmss so multiple builds on the same calendar day each receive a unique, monotonically increasing version that PyPI will accept. The legacy NIGHTLY_DATE_YYYYMMDD env var override is still honoured; a new NIGHTLY_DATE_SUFFIX var is also supported. Made-with: Cursor
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.
Summary
nemotron_ocr_cppC++ extension was only built on x86_64 GitHub Actions runners, producing a wheel that fails withModuleNotFoundError: No module named 'nemotron_ocr_cpp._nemotron_ocr_cpp'on ARM hosts (e.g. NVIDIA DGX Spark).build_ocr_cudajob to a matrix strategy that builds on bothubuntu-latest(x86_64) andubuntu-24.04-arm(aarch64), using the samenvidia/cuda:13.0.0-devel-ubuntu24.04container image (published for both architectures).dist-nemotron-ocr-v1-x86_64/dist-nemotron-ocr-v1-aarch64) to avoid upload collisions.Test plan
upload_to: noneand verify both matrix legs (x86_64 and aarch64) complete successfully.so(e.g._nemotron_ocr_cpp.cpython-312-aarch64-linux-gnu.so)from nemotron_ocr_cpp._nemotron_ocr_cpp import *succeedsMade with Cursor