-
Notifications
You must be signed in to change notification settings - Fork 196
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
py2llvm: unroll loops based on necessity and not size #42
Labels
Comments
new-py2llvm does/will not unroll loops unless necessary. |
Does it handle this properly: @kernel
def run(self):
for t in range(10):
t2 = t*100
with parallel:
self.ttl0.pulse(t2) |
Closing as unrolling is merged; your comment will be addressed in a separate issue. |
AR-PyT
pushed a commit
to AR-PyT/artiq
that referenced
this issue
Aug 23, 2024
Fixes issue m-labs#42. Previously there was no fix for the variable alignment. We calculate the position of the variable based on the size of the previous variable, so we could break the alignment requirement for variables. For example, having a `i64` after `bool` could break the alignment required for `i64` and trigger DataAbort or data corruption. However, this requires the same data layout and LLVM type for the variables. If this cannot be maintained, this would break the alignment on the other side of the RPC, either from host to kernel or kernel to host.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Loops should be unrolled in py2llvm when required by control flow (e.g. interleaving). Other unrollings should be left to LLVM.
The text was updated successfully, but these errors were encountered: