Skip to content

Bug/fix dl pack tests on jetson (Issue #1233) - #1236

Merged
cliffburdick merged 2 commits into
NVIDIA:mainfrom
lennartvoelz:bug/fix_DLPackTests_on_Jetson
Aug 25, 2026
Merged

Bug/fix dl pack tests on jetson (Issue #1233)#1236
cliffburdick merged 2 commits into
NVIDIA:mainfrom
lennartvoelz:bug/fix_DLPackTests_on_Jetson

Conversation

@lennartvoelz

@lennartvoelz lennartvoelz commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes the DLPackTestsAll.ExportLegacyDLPack (Issue #1233) suite on the Jetson platform and extends coverage with explicit device type test cases.

Changes

  • derive the device type from GetPointerKind instead of hardcoding KDLCUDA
  • split the test into explicit blocks per memory space, each asserted against an expected value
  • wrap each check_dl_export call in ASSERT_NO_FATAL_FAILURE

Out of scope

ToDlPackImpl's GetPointerKind lookup only resolves base pointers (see issue #1235)

Testing

Built and ran test_00_tensor_DLPackTests on Jetson Orin AGX: 58/58 tests pass.

- query actual memory space with GetPointerKind; do not hardcode kDLCUDA
because the default memory space is platform dependend
- add explicit tests for MATX_DEVICE_MEMORY and MATX_HOST_MEMORY
- wrap check_dl_export lambda calls in ASSERT_NO_FATAL_FAILURE; ASSERT_EQ only returns from the lambda, not the enclosing test
- guard the default memory block by asserting that the default allocation can only ever be managed or pinned host memory
- add coverage for MATX_HOST_MALLOC_MEMORY
@copy-pr-bot

copy-pr-bot Bot commented Aug 24, 2026

Copy link
Copy Markdown

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@greptile-apps

greptile-apps Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR expands the legacy DLPack export test to validate device metadata for default, device, pinned-host, and pageable-host allocations while accommodating Jetson’s managed-memory fallback.

  • Derives the default allocation’s expected DLPack device type from its recorded pointer kind.
  • Adds explicit coverage for CUDA device, CUDA pinned-host, and CPU pageable memory.
  • Reuses a helper to validate shape, strides, dtype, pointer, device metadata, and reference-count cleanup.

Confidence Score: 5/5

The PR appears safe to merge because the added expectations match the current allocator invariants and DLPack device mappings.

The changed test correctly handles Jetson’s pinned-host fallback and validates each explicit memory space against the corresponding production mapping without introducing a supported-platform failure.

Important Files Changed

Filename Overview
test/00_tensor/DLPackTests.cu Expands DLPack export coverage across memory spaces with expectations consistent with the allocator and ToDlPack mappings; no actionable regression identified.

Reviews (1): Last reviewed commit: "Fix assertion leak and extend coverage w..." | Re-trigger Greptile

@cliffburdick

Copy link
Copy Markdown
Collaborator

/build

@coveralls

Copy link
Copy Markdown

Coverage Status

Coverage is 93.336%lennartvoelz:bug/fix_DLPackTests_on_Jetson into NVIDIA:main. No base build found for NVIDIA:main.

@cliffburdick
cliffburdick merged commit c7d06cb into NVIDIA:main Aug 25, 2026
2 checks passed
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.

3 participants