You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to pass a kernel function pointer to a child class for it to run - this currently does not work. Is there any chance of this being supported?
root:Terminating with exception (AttributeError: type object 'ChildTest' has no attribute 'func_pointer')
Traceback (most recent call last):
File "/home/ion/artiq-dev/artiq/artiq/master/worker_impl.py", line 228, in main
exp_inst.run()
File "/home/ion/repo/tests/artiq/func_pointer_test.py", line 23, in run
self.child.run()
File "/home/ion/artiq-dev/artiq/artiq/language/core.py", line 54, in run_on_core
return getattr(self, arg).run(run_on_core, ((self,) + k_args), k_kwargs)
File "/home/ion/artiq-dev/artiq/artiq/coredevice/core.py", line 111, in run
self.compile(function, args, kwargs, set_result)
File "/home/ion/artiq-dev/artiq/artiq/coredevice/core.py", line 95, in compile
library = target.compile_and_link([module])
File "/home/ion/artiq-dev/artiq/artiq/compiler/targets.py", line 180, in compile_and_link
return self.link([self.assemble(self.compile(module)) for module in modules],
File "/home/ion/artiq-dev/artiq/artiq/compiler/targets.py", line 180, in <listcomp>
return self.link([self.assemble(self.compile(module)) for module in modules],
File "/home/ion/artiq-dev/artiq/artiq/compiler/targets.py", line 137, in compile
llmod = module.build_llvm_ir(self)
File "/home/ion/artiq-dev/artiq/artiq/compiler/module.py", line 82, in build_llvm_ir
return llvm_ir_generator.process(self.artiq_ir, attribute_writeback=True)
File "/home/ion/artiq-dev/artiq/artiq/compiler/transforms/llvm_ir_generator.py", line 408, in process
self.process_function(func)
File "/home/ion/artiq-dev/artiq/artiq/compiler/transforms/llvm_ir_generator.py", line 570, in process_function
llinsn = getattr(self, "process_" + type(insn).__name__)(insn)
File "/home/ion/artiq-dev/artiq/artiq/compiler/transforms/llvm_ir_generator.py", line 1469, in process_Quote
return self._quote(insn.value, insn.type, lambda: [repr(insn.value)])
File "/home/ion/artiq-dev/artiq/artiq/compiler/transforms/llvm_ir_generator.py", line 1416, in _quote
lambda: path() + ['__class__'])
File "/home/ion/artiq-dev/artiq/artiq/compiler/transforms/llvm_ir_generator.py", line 1417, in _quote
return _quote_attributes()
File "/home/ion/artiq-dev/artiq/artiq/compiler/transforms/llvm_ir_generator.py", line 1391, in _quote_attributes
attrvalue = getattr(value, attr)
AttributeError: type object 'ChildTest' has no attribute 'func_pointer'
The text was updated successfully, but these errors were encountered:
I am trying to pass a kernel function pointer to a child class for it to run - this currently does not work. Is there any chance of this being supported?
The experiment:
The traceback:
The text was updated successfully, but these errors were encountered: