Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR updates the Iris framework to match PyTorch's arange signature and improve memory format handling. The changes align the framework more closely with PyTorch's tensor creation APIs while maintaining compatibility with the symmetric heap allocation system.
Key changes include:
- Modified
arangemethod signature to match PyTorch with keyword-only parameters - Enhanced
zeros_liketo support additional memory formats likechannels_lastandchannels_last_3d - Improved device handling to default to input tensor's device rather than Iris device
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 4 comments.
| File | Description |
|---|---|
| iris/iris.py | Updated arange signature, enhanced memory format support in zeros_like, improved device validation |
| tests/unittests/test_arange.py | New comprehensive test file for arange functionality covering all parameter combinations |
| tests/unittests/test_zeros_like.py | Updated tests to reflect new device defaults and added tests for new memory format support |
Comments suppressed due to low confidence (1)
tests/unittests/test_zeros_like.py:1
- These tests expect
ValueErrorto be raised, but this contradicts PyTorch's behavior. PyTorcharange(5, 1)returns an empty tensortensor([], dtype=torch.int64)rather than raising an error. The tests should verify the actual PyTorch behavior or the implementation should be updated to match PyTorch.
# SPDX-License-Identifier: MIT
mawad-amd
commented
Sep 1, 2025
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.
Motivation
Match PyTorch
arangesignature.Technical Details
Test Plan
Test Result
Submission Checklist