Skip to content

kernel function with attribute #663

Description

@kaihsin

We would like to support of kernel function definition with mark some argument as attribute. An example in python 3.13+ syntax would be:

@basic
def my_func[attr_foo: float, attr_boo: int](arg_x; int):
       return attr_foo + attr_boo + arg_x

and get used with:

@basic
def main(x: int):
     my_func[3.0, 5.0](x)

and will error with:

@basic
def main(y: float):
     my_func[y, 5.0](1) # y cannot be resolve at compile time

ideally some syntax sugar for supporting this in <3.13 would be also preferred.

@Roger-luo @zhenrongliew

Metadata

Metadata

Assignees

No one assigned

    Labels

    category: featureCategory: new feature or feature request.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions