Skip to content

Comments

Match PyTorch arange signature #133

Merged
mawad-amd merged 13 commits intomainfrom
muhaawad/arange
Sep 1, 2025
Merged

Match PyTorch arange signature #133
mawad-amd merged 13 commits intomainfrom
muhaawad/arange

Conversation

@mawad-amd
Copy link
Collaborator

Motivation

Match PyTorch arange signature.

Technical Details

Test Plan

Test Result

Submission Checklist

Copilot AI review requested due to automatic review settings September 1, 2025 02:28
@github-actions github-actions bot added in-progress We are working on it iris Iris project issue labels Sep 1, 2025

This comment was marked as outdated.

mawad-amd and others added 3 commits August 31, 2025 19:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mawad-amd mawad-amd requested a review from Copilot September 1, 2025 02:40

This comment was marked as outdated.

mawad-amd and others added 2 commits August 31, 2025 19:41
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mawad-amd mawad-amd requested a review from Copilot September 1, 2025 02:42

This comment was marked as outdated.

mawad-amd and others added 3 commits August 31, 2025 19:44
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@mawad-amd mawad-amd requested a review from Copilot September 1, 2025 02:59

This comment was marked as outdated.

@mawad-amd mawad-amd requested a review from Copilot September 1, 2025 03:05
Copy link
Contributor

Copilot AI left a comment

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 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 arange method signature to match PyTorch with keyword-only parameters
  • Enhanced zeros_like to support additional memory formats like channels_last and channels_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 ValueError to be raised, but this contradicts PyTorch's behavior. PyTorch arange(5, 1) returns an empty tensor tensor([], 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 mawad-amd merged commit 4d23b4f into main Sep 1, 2025
3 checks passed
@mawad-amd mawad-amd deleted the muhaawad/arange branch September 1, 2025 03:21
@github-actions github-actions bot restored the muhaawad/arange branch September 1, 2025 03:22
@neoblizz neoblizz deleted the muhaawad/arange branch October 22, 2025 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in-progress We are working on it iris Iris project issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant