Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get global variables of taichi kernels and functions using __globals__ #3944

Closed
lin-hitonami opened this issue Jan 5, 2022 · 0 comments · Fixed by #3949
Closed

Get global variables of taichi kernels and functions using __globals__ #3944

lin-hitonami opened this issue Jan 5, 2022 · 0 comments · Fixed by #3949
Labels
feature request Suggest an idea on this project

Comments

@lin-hitonami
Copy link
Contributor

Concisely describe the proposed feature
We currently use inspect.getclosurevars to get global variables used in taichi kernels and functions. It can minimize the size of the global variable dict. However, it has many limitations. As mentioned in #3709, it ignores the variables in the annotations. It also ignores variables in listcomps and dictcomps.

Describe the solution you'd like (if any)
We can change back to the method in #282 to solve the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Suggest an idea on this project
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant