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
For development purposes, I think that it would be nice if PyKokkos workunits/functions/workloads/functors supported docstrings for documentation.
For example, when trying to document this hello world script with a docstring,
importpykokkosaspk@pk.workunitdefhello(i: int):
"""CUDA Kernel to print hello world in parallel. Args: i (int): thread id """pk.printf("Hello, World! from i = %d\n", i)
defmain():
pk.set_default_space(pk.Cuda)
pk.parallel_for(10, hello)
main()
PyKokkos throws the following error:
Error on line 5 : Only function calls are allowed as standalone statements
DEBUG AST:
Expr(
value=Constant(value='CUDA Kernel to print hello world in parallel.\n\n Args:\n i (int): thread id\n '))
"""CUDA Kernel to print hello world in parallel.
^^^
Translation of <ast.FunctionDef object at 0x14c44b774d90> hello failed
Without knowing much about the inner-workings of PyKokkos, I think the fix would revolve around having the parser ignore standalone strings that come a line after the function deceleration.
I can give the fix a shot if anyone wants to point me in the right direction (and, of course, if it is as easy as I think) :)
The text was updated successfully, but these errors were encountered:
For development purposes, I think that it would be nice if PyKokkos
workunits
/functions
/workloads
/functors
supported docstrings for documentation.For example, when trying to document this hello world script with a docstring,
PyKokkos throws the following error:
Without knowing much about the inner-workings of PyKokkos, I think the fix would revolve around having the parser ignore standalone strings that come a line after the function deceleration.
I can give the fix a shot if anyone wants to point me in the right direction (and, of course, if it is as easy as I think) :)
The text was updated successfully, but these errors were encountered: