passing string into kernel invokation breaks #299

Open
opened 2022-06-06 23:42:58 +08:00 by sb10q · 0 comments

from test_cache.py:

    @kernel
    def put(self, key: str, value: list[int32]):
        ...

    def test_borrow(self):
        ...
            exp.get_put("x4", [])
======================================================================
ERROR: test_borrow (test_cache.CacheTest)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/sb/artiq/artiq/test/coredevice/test_cache.py", line 53, in test_borrow
    exp.put("x4", [1, 2, 3])
  File "/home/sb/artiq/artiq/language/core.py", line 76, in run_on_core
    return self.core.run(fake_method, args, kwargs)
  File "/home/sb/artiq/artiq/coredevice/core.py", line 84, in run
    kernel_library = self.compile(function, args, kwargs, embedding_map)
  File "/home/sb/artiq/artiq/coredevice/core.py", line 78, in compile
    return self.compiler.compile_method_to_mem(obj, name, args, embedding_map)
nac3artiq.CompileError: compilation failed
----------
type error (<class 'str'> is not registered with NAC3 (@nac3 decorator missing?)) at parameter #0 when calling kernel function

from ``test_cache.py``: ``` @kernel def put(self, key: str, value: list[int32]): ... def test_borrow(self): ... exp.get_put("x4", []) ``` ``` ====================================================================== ERROR: test_borrow (test_cache.CacheTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/sb/artiq/artiq/test/coredevice/test_cache.py", line 53, in test_borrow exp.put("x4", [1, 2, 3]) File "/home/sb/artiq/artiq/language/core.py", line 76, in run_on_core return self.core.run(fake_method, args, kwargs) File "/home/sb/artiq/artiq/coredevice/core.py", line 84, in run kernel_library = self.compile(function, args, kwargs, embedding_map) File "/home/sb/artiq/artiq/coredevice/core.py", line 78, in compile return self.compiler.compile_method_to_mem(obj, name, args, embedding_map) nac3artiq.CompileError: compilation failed ---------- type error (<class 'str'> is not registered with NAC3 (@nac3 decorator missing?)) at parameter #0 when calling kernel function ```
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#299
There is no content yet.