Skip to content
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

Closed
jordens opened this issue Jun 21, 2015 · 3 comments
Closed

py2llvm: unroll loops based on necessity and not size #42

jordens opened this issue Jun 21, 2015 · 3 comments
Assignees

Comments

@jordens
Copy link
Member

jordens commented Jun 21, 2015

Loops should be unrolled in py2llvm when required by control flow (e.g. interleaving). Other unrollings should be left to LLVM.

@whitequark
Copy link
Contributor

new-py2llvm does/will not unroll loops unless necessary.

@sbourdeauducq
Copy link
Member

Does it handle this properly:

    @kernel
    def run(self):
        for t in range(10):        
            t2 = t*100
            with parallel:
                self.ttl0.pulse(t2)

@sbourdeauducq sbourdeauducq reopened this Aug 19, 2015
@whitequark
Copy link
Contributor

Closing as unrolling is merged; your comment will be addressed in a separate issue.

hartytp referenced this issue in hartytp/artiq Jun 19, 2022
fix bad merge commit in PR#39
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
Projects
None yet
Development

No branches or pull requests

3 participants