Skip to content

Conversation

@hunhoffe
Copy link
Collaborator

@hunhoffe hunhoffe commented Nov 21, 2025

This PR implements stateful destructive device slicing, allowing devices to be partitioned into non-overlapping views. Device classes are now stored as class references rather than instances in the configuration, and slicing operations claim tiles to prevent double allocation.

  • Introduces DeviceView and DeviceLike classes to support device slicing with tile claiming
  • Modifies device configuration to store device classes instead of instances
  • Updates SequentialPlacer to remove the cores_per_col parameter and use device slicing instead

This feature, together with a stateful SequentialPlacer, is likely enough to use the placer across designs so that placed designs could be combined. That thought is for a future PR though.

Thanks to copilot for the assist in the summary writing!

@hunhoffe hunhoffe changed the title [WIP] Device Slicer [WIP] Stateful Destructive Device Slicing Nov 21, 2025
@hunhoffe hunhoffe marked this pull request as draft November 21, 2025 20:12
@fifield fifield requested a review from Copilot November 22, 2025 00: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 implements stateful destructive device slicing, allowing devices to be partitioned into non-overlapping views. Device classes are now stored as class references rather than instances in the configuration, and slicing operations claim tiles to prevent double allocation.

  • Introduces DeviceView and DeviceLike classes to support device slicing with tile claiming
  • Modifies device configuration to store device classes instead of instances
  • Updates SequentialPlacer to remove the cores_per_col parameter and use device slicing instead

Reviewed changes

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

Show a summary per file
File Description
test/python/set_current_device.py Tests device class-based configuration and multiple device type handling
test/python/placer_tests.py Updates tests to use device slicing instead of cores_per_col parameter
test/python/device_slicing.py Adds comprehensive test coverage for device slicing functionality
python/iron/program.py Removes device instance recreation logic
python/iron/placers.py Removes cores_per_col parameter and fixes device.cols reference
python/iron/hostruntime/config.py Changes device storage from instances to classes
python/iron/device/device.py Implements DeviceLike, DeviceView, and Device slicing with tile claiming

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

hunhoffe and others added 5 commits November 21, 2025 17:09
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants