Cannot pass str into kernels from outside #491

Closed
opened 2024-08-13 16:06:52 +08:00 by mwojcik · 0 comments
Member
from artiq.experiment import *


@nac3
class StrFail(EnvExperiment):
    def build(self):
        self.setattr_device("core")

    @kernel
    def hello(self, arg: str):
        print_rpc(arg)

    def run(self):
        self.hello("world")

results in:

thread 'codegen-worker-main' panicked at /build/source/nac3core/src/codegen/mod.rs:378:13:
Call parameter type does not match function signature!
[6 x i8] c"world\00"
 %str = type { i8*, i32 }  call void @artiq_run_str_fail.StrFail.hello.0(%artiq_run_str_fail.StrFail* @"140736733248208", [6 x i8] c"world\00"), !dbg !9
```python from artiq.experiment import * @nac3 class StrFail(EnvExperiment): def build(self): self.setattr_device("core") @kernel def hello(self, arg: str): print_rpc(arg) def run(self): self.hello("world") ``` results in: ``` thread 'codegen-worker-main' panicked at /build/source/nac3core/src/codegen/mod.rs:378:13: Call parameter type does not match function signature! [6 x i8] c"world\00" %str = type { i8*, i32 } call void @artiq_run_str_fail.StrFail.hello.0(%artiq_run_str_fail.StrFail* @"140736733248208", [6 x i8] c"world\00"), !dbg !9 ```
mwojcik changed title from Cannot pass ``str`` into kernels from outside to Cannot pass `str` into kernels from outside 2024-08-13 16:07:41 +08:00
sb10q closed this issue 2024-08-14 09:30:09 +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#491
No description provided.