Comments (3)
Some actions items from this list that I think make sense after further discussion:
- Sizes arguments for segments and herds should probably be validated to be 2 dimensional (e.g., segment size
[1]
should probably not be valid) - To clean up air python code, I should figure out how to hide the four arguments for a herd of default
[1,1]
size, the same way it is for segments.
from mlir-air.
Adding here for "documentation":
Multiple herds can exist in a segment and are placed to fit and the segment must have enough resources for that placement, the herds are guaranteed to run/exist at the same time within the spatial fabric the segment reserves. Same goes for segments within a launch, they are guaranteed to exist on the device at the same time or the launch cannot be executed. Therefore both herds and segments should have a shape. Though the shape of a segment is much more physical and must account for the structure of a target device's dataflow units (DUs), where a DU is the smallest unit of reservation/configuration. Launch has an "iteration space" for invocations of that launch and those can exist in space or time. It is up for debate whether the iteration space is a simple count or a shape.
from mlir-air.
Here are a few points from discussion today:
- It's a bit unclear whether herd sizes correspond to physical blocks/shapes, or to iteration spaces
- Segments correspond to iteration spaces, so how segments function makes sense with
[1]
being valid (to be specific, 1 or 2 or 3 dimensions should be valid) - Regardless, for a user, being able to specify the size of the herd in a multi-dimensional way and then get access to indices for each iteration may save the programmer from repetitive modular arithmetic to calculate indices. So we don't want to move to a single-dimension
count
argument as a matter of utility/convenience, regardless of what physical dimensions the device may have.
From this, the favored solution would be:
- Fix bugs/current state so that herds function the same way that segments do as shown in the examples in the initial issue writeup above
- Eventually, there should be an additional argument to herd declaration that specifies whether the size should correspond to the physical shape or not, and this flag should be percolated to the compiler passes which do the physical mapping to let the passes know if they are permitted to change the shape or not.
Outstanding implementation question: where should validation happen?
- My thought: If the herd op should then be able to take in a shape of 1, 2, (or 3 even) dimensions - it would be up to the compiler to decide, if the shape is meant to be taken as a physical description, whether the dimension is valid for the target device (e.g., for npu, I think a two dimensional physical shape would be required).
from mlir-air.
Related Issues (20)
- Undefined symbol on test 21 HOT 1
- Form Herds from Multiple scf.forall nests. HOT 2
- Build instructions clarification in docs
- Build instructions/getting started for RyzenAI / XRT HOT 6
- github runner sets max locked memory too low for some tests HOT 1
- Single Core DMA/Channel Matrix Scalar Add Examples Broken HOT 2
- Multi Core DMA Matrix Scalar Add Example Fails HOT 3
- Multi Core Channel Matrix Scalar Add Example Fails HOT 6
- Multiple launches, herd with single core HOT 8
- Running Matrix Scalar Add Examples with `aircc --experimental-passes` HOT 2
- `XRTBackend` Implementation of `AirBackend` is Confusing HOT 2
- Limit on ChannelGet/ChannelPut operations? HOT 1
- Channel Examples
- Worker-to-Self Channel Example HOT 5
- Illegal Allocation Catch in Verifier
- Worker-to-Worker Channel Example
- AllocOps and load/store ops in Launch and Segment HOT 1
- Python Multiple Segment Examples
- Access memory allocated in segment in the herd HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mlir-air.