Skip to content

Allow host-pinned pointers in SetVals()#1128

Merged
cliffburdick merged 2 commits intomainfrom
setvals_memtype
Feb 23, 2026
Merged

Allow host-pinned pointers in SetVals()#1128
cliffburdick merged 2 commits intomainfrom
setvals_memtype

Conversation

@cliffburdick
Copy link
Collaborator

No description provided.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Feb 23, 2026

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.

@cliffburdick
Copy link
Collaborator Author

/build

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 23, 2026

Greptile Summary

Extends SetVals() functionality to support host-accessible pointers (managed, host-pinned, or ATS-mapped) instead of only CUDA managed pointers. The implementation replaces IsManagedPointer() with IsHostAccessiblePointer(), which uses CU_POINTER_ATTRIBUTE_HOST_POINTER to determine if a pointer can be accessed from the host. All documentation comments and error messages have been updated to reflect the expanded support. The [[maybe_unused]] attribute has been properly applied to the retval variable as noted in previous review feedback.

Confidence Score: 5/5

  • This PR is safe to merge with minimal risk
  • The change is well-implemented and extends functionality in a backward-compatible way. The new IsHostAccessiblePointer() method correctly uses CUDA's pointer attribute API, maintains the [[maybe_unused]] attribute for release builds, and updates all relevant documentation. The logic properly checks for host-accessible pointers by verifying the returned host pointer is non-null.
  • No files require special attention

Important Files Changed

Filename Overview
include/matx/core/tensor.h Extends SetVals() to support host-pinned and ATS-mapped pointers by replacing IsManagedPointer() with IsHostAccessiblePointer(), includes proper [[maybe_unused]] attribute

Last reviewed commit: 1994bbc

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, 1 comment

Edit Code Review Agent Settings | Greptile

Co-authored-by: greptile-apps[bot] <165735046+greptile-apps[bot]@users.noreply.github.com>
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

1 file reviewed, no comments

Edit Code Review Agent Settings | Greptile

@cliffburdick cliffburdick merged commit 67681ab into main Feb 23, 2026
@cliffburdick cliffburdick deleted the setvals_memtype branch February 23, 2026 22:13
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.

1 participant