请问在kernel中使用data_oriented中的函数出现这个警告是怎么回事

会出现这个警告:

UserWarning: Calling non-taichi function "b.f". 
Scope inside the function is not processed by the Taichi AST transformer. 
The function may not work as expected.
Proceed with caution! Maybe you can consider turning it into a @ti.func?
  b.f()

我的代码如下:

@ti.data_oriented
class test:

    D:ti.f64

    def __init__(self):

        self.D = ti.math.nan

    # @ti.func
    def f(self):

        self.D = 1
        return self.D


@ti.kernel
def q(b:ti.template()):

    b.f()

a = test()
q(a)

这个功能对我的一个项目很重要,非常感谢各位大佬看看,希望不吝赐教!

@ti.kernel function new object will raise UserWarning on taichi 1.0.2 · Issue #5049 · taichi-dev/taichi (github.com)