Skip to content

[Fix] Align tensor integer storage with pointer types - #700

Merged
coderfeli merged 1 commit into
mainfrom
pr/fix-tensor-elemType
Jun 17, 2026
Merged

[Fix] Align tensor integer storage with pointer types#700
coderfeli merged 1 commit into
mainfrom
pr/fix-tensor-elemType

Conversation

@sjfeng1999

Copy link
Copy Markdown
Collaborator

Motivation

Technical Details

Test Plan

Test Result

Submission Checklist

Copilot AI review requested due to automatic review settings June 17, 2026 04:16

Copilot AI left a comment

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.

Pull request overview

This PR aims to align how integer tensor element types are represented in MLIR across the Python JIT argument layer (Torch tensors) and the DLPack adaptor, by switching integer MLIR types to “signless”.

Changes:

  • Updated torch.dtype → MLIR integer type mapping to use signless integer types.
  • Updated DLPack kDLInt / kDLUInt → MLIR integer type mapping to use signless integer types.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.

File Description
python/flydsl/compiler/jit_argument.py Changes Torch tensor dtype-to-MLIR type mapping for integer dtypes.
lib/Bindings/Python/DLTensorAdaptor.h Changes DLPack dtype-to-MLIR type mapping for signed/unsigned integers.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread python/flydsl/compiler/jit_argument.py
Comment thread lib/Bindings/Python/DLTensorAdaptor.h
Comment thread python/flydsl/compiler/jit_argument.py
@sjfeng1999

Copy link
Copy Markdown
Collaborator Author

#701 tracks the remaining problem of losing signedness

@sjfeng1999
sjfeng1999 requested a review from coderfeli June 17, 2026 07:07
@coderfeli
coderfeli merged commit 2649837 into main Jun 17, 2026
14 checks passed
@coderfeli
coderfeli deleted the pr/fix-tensor-elemType branch June 17, 2026 08: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.

3 participants