-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[TK] Add a TestLaunchContext for generating test dispatch IRs #429
Conversation
raise ValueError( | ||
f"Cannot create {type(self)}({', '.join(str(i) for i in dims)}): mismatched symbolic rank" | ||
) | ||
def __init__(self): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of passing the grid bindings as inputs, I am now making the grid find out the symbol bindings from the IndexingContext, and if it cannot find a binding for the symbol, it should consider it a workload binding. Currently, this promotion to a workload binding is not implemented and every symbol is assumed to have a constant value.
self.rank = rank | ||
self.rank = len(self.dims) | ||
|
||
def __class_getitem__( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just to fix a type error. Metaclasses should not have class_getitem on them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
First pass: I need to get this review on a bigger screen for a more detailed look.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LG. I think this is just about at the carrying capacity of what we can do without a pass through for more fine grained tests and code organization.
This patch changes the way we do grid bindings. It is now expected that the IndexingContext will have the workload values and the grid on construction will try to build it's dims using them. Currently, all symbols are assumed to have a constant value, so the grid is able to map workgroup calculations to constants.
Ideally, we would have support to parameterize the kernel by some symbols, which would be passed as workload bindings (We have no support for this currently).