ndarray crash in ARTIQ #441

Closed
opened 2024-07-02 19:12:28 +08:00 by sb10q · 1 comment
Owner
from artiq.experiment import *
from artiq.coredevice.core import Core

from numpy import (
    zeros as np_zeros,
    cos as np_cos)


@nac3
class Arrays(EnvExperiment):
    core: KernelInvariant[Core]

    def build(self):
        self.setattr_device("core")

    @kernel
    def run(self):
        x = np_zeros(20)
        y = np_cos(x)
$ artiq_compile array.py
Got an unknown error: Any { .. }
thread '<unnamed>' panicked at nac3core/src/codegen/mod.rs:326:9:
tasks panicked
Traceback (most recent call last):
  File "/nix/store/gk1casmgpdjvw7gmnq95vfcf4ixg9wq0-python3.11-artiq-10.9159+c8f95b1.beta/bin/.artiq_compile-wrapped", line 9, in <module>
    sys.exit(main())
             ^^^^^^
  File "/nix/store/zvnqi77b0x47fan6gvlsh1fzs5qyz2l6-python3-3.11.9-env/lib/python3.11/site-packages/artiq/frontend/artiq_compile.py", line 68, in main
    exp_inst.core.compile(exp_inst.run, [], {}, embedding_map, file_output=output)
  File "/nix/store/zvnqi77b0x47fan6gvlsh1fzs5qyz2l6-python3-3.11.9-env/lib/python3.11/site-packages/artiq/coredevice/core.py", line 112, in compile
    self.compiler.compile_method_to_file(obj, name, args, file_output, embedding_map)
pyo3_runtime.PanicException: tasks panicked
``` from artiq.experiment import * from artiq.coredevice.core import Core from numpy import ( zeros as np_zeros, cos as np_cos) @nac3 class Arrays(EnvExperiment): core: KernelInvariant[Core] def build(self): self.setattr_device("core") @kernel def run(self): x = np_zeros(20) y = np_cos(x) ``` ``` $ artiq_compile array.py Got an unknown error: Any { .. } thread '<unnamed>' panicked at nac3core/src/codegen/mod.rs:326:9: tasks panicked Traceback (most recent call last): File "/nix/store/gk1casmgpdjvw7gmnq95vfcf4ixg9wq0-python3.11-artiq-10.9159+c8f95b1.beta/bin/.artiq_compile-wrapped", line 9, in <module> sys.exit(main()) ^^^^^^ File "/nix/store/zvnqi77b0x47fan6gvlsh1fzs5qyz2l6-python3-3.11.9-env/lib/python3.11/site-packages/artiq/frontend/artiq_compile.py", line 68, in main exp_inst.core.compile(exp_inst.run, [], {}, embedding_map, file_output=output) File "/nix/store/zvnqi77b0x47fan6gvlsh1fzs5qyz2l6-python3-3.11.9-env/lib/python3.11/site-packages/artiq/coredevice/core.py", line 112, in compile self.compiler.compile_method_to_file(obj, name, args, file_output, embedding_map) pyo3_runtime.PanicException: tasks panicked ```
sb10q added the
high-priority
label 2024-07-02 19:12:38 +08:00
Author
Owner

Seems to be wrong LLVM IR emitted and likely reproducible with nac3standalone.

Seems to be wrong LLVM IR emitted and likely reproducible with nac3standalone.
lyken was assigned by sb10q 2024-07-02 19:14:55 +08:00
sb10q closed this issue 2024-07-03 13:56:25 +08:00
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/nac3#441
No description provided.