-
Notifications
You must be signed in to change notification settings - Fork 180
[TRITON] support.conv3d.triton.kernel #1888
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
base: main
Are you sure you want to change the base?
Conversation
| padding_same = lambda i, w, stride, dilation: math.ceil( | ||
| (stride * (i - 1) + 1 + dilation * (w - 1) - i) / 2 | ||
| ) |
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.
Do not assign a lambda expression, use a def
| padding_same = lambda i, w, stride, dilation: math.ceil( | |
| (stride * (i - 1) + 1 + dilation * (w - 1) - i) / 2 | |
| ) | |
| def padding_same(i, w, stride, dilation): | |
| return math.ceil( | |
| (stride * (i - 1) + 1 + dilation * (w - 1) - i) / 2 | |
| ) |
| out_padding = lambda i, w, padding, stride, dilation: int( | ||
| (i + 2 * padding - dilation * (w - 1) - 1) / stride + 1 | ||
| ) |
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.
Do not assign a lambda expression, use a def
| out_padding = lambda i, w, padding, stride, dilation: int( | |
| (i + 2 * padding - dilation * (w - 1) - 1) / stride + 1 | |
| ) | |
| def out_padding(i, w, padding, stride, dilation): | |
| return int( | |
| (i + 2 * padding - dilation * (w - 1) - 1) / stride + 1 | |
| ) |
| grid_fn = lambda META: ( | ||
| triton.cdiv(N * od * oh * ow, META['BLOCK_NI_DO_HO_WO']), | ||
| triton.cdiv(oc // groups, META['BLOCK_CO']), | ||
| groups, | ||
| ) |
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.
Do not assign a lambda expression, use a def
| grid_fn = lambda META: ( | |
| triton.cdiv(N * od * oh * ow, META['BLOCK_NI_DO_HO_WO']), | |
| triton.cdiv(oc // groups, META['BLOCK_CO']), | |
| groups, | |
| ) | |
| def grid_fn(META): | |
| return ( | |
| triton.cdiv(N * od * oh * ow, META['BLOCK_NI_DO_HO_WO']), | |
| triton.cdiv(oc // groups, META['BLOCK_CO']), | |
| groups, | |
| ) |
| padding_same = lambda i, w, stride, dilation: math.ceil( | ||
| (stride * (i - 1) + 1 + dilation * (w - 1) - i) / 2 | ||
| ) |
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.
Do not assign a lambda expression, use a def
| padding_same = lambda i, w, stride, dilation: math.ceil( | |
| (stride * (i - 1) + 1 + dilation * (w - 1) - i) / 2 | |
| ) | |
| def padding_same(i, w, stride, dilation): | |
| return math.ceil( | |
| (stride * (i - 1) + 1 + dilation * (w - 1) - i) / 2 | |
| ) |
| out_padding = lambda i, w, padding, stride, dilation: int( | ||
| (i + 2 * padding - dilation * (w - 1) - 1) / stride + 1 | ||
| ) |
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.
Do not assign a lambda expression, use a def
| out_padding = lambda i, w, padding, stride, dilation: int( | |
| (i + 2 * padding - dilation * (w - 1) - 1) / stride + 1 | |
| ) | |
| def out_padding(i, w, padding, stride, dilation): | |
| return int( | |
| (i + 2 * padding - dilation * (w - 1) - 1) / stride + 1 | |
| ) |
| grid_fn = lambda META: ( | ||
| triton.cdiv(N * od * oh * ow, META['BLOCK_NI_DO_HO_WO']), | ||
| triton.cdiv(oc // groups, META['BLOCK_CO']), | ||
| groups, | ||
| ) |
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.
Do not assign a lambda expression, use a def
| grid_fn = lambda META: ( | |
| triton.cdiv(N * od * oh * ow, META['BLOCK_NI_DO_HO_WO']), | |
| triton.cdiv(oc // groups, META['BLOCK_CO']), | |
| groups, | |
| ) | |
| def grid_fn(META): | |
| return ( | |
| triton.cdiv(N * od * oh * ow, META['BLOCK_NI_DO_HO_WO']), | |
| triton.cdiv(oc // groups, META['BLOCK_CO']), | |
| groups, | |
| ) |
|
This kernel is the same as the one here which has a different license. Also it is not good for our AI libs to have kernels from other companies. I would suggest closing this PR and writing a conv 3d kernel from scratch. Thanks. |
Motivation
Technical Details
Test Plan
Test Result
Submission Checklist