-
Notifications
You must be signed in to change notification settings - Fork 54
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
Prefer Array class over register arrays. #3737
base: main
Are you sure you want to change the base?
Conversation
!test |
PR Reviewer Guide 🔍(Review updated until commit 1e7014a)Here are some key observations to aid the review process:
|
!test --pybench |
All tests passing. |
Any specific reason? |
Likely because currently we are using |
Possibly related: #1475 |
csrc/codegen.cpp
Outdated
@@ -265,7 +265,9 @@ class CudaKernelGenerator : private kir::ConstIrVisitor { | |||
} else if (v->isA<TensorView>()) { | |||
tv = v->as<TensorView>(); | |||
} | |||
if (tv && aligned_array_of_regs_.count(tv)) { | |||
if (tv && | |||
(aligned_array_of_regs_.count(tv) || |
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.
Seems that aligned_array_of_regs_
can be removed now.
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.
Makes sense, will remove.
@naoyam I thought it would help to make things consistent. I also wanted to convert RNG to all use the class instead of literal arrays. This would help do something like generate bit array with Philox and reinterpret it as more lower precision integer types. |
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.
LGTM
!test |
!test |
Prefer Array class over register arrays.
For example in code generation use
Array<float, 2>
notfloat[2]
.