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

Removing dependence on inspect #226

Merged
merged 13 commits into from
Dec 29, 2023
Merged

Removing dependence on inspect #226

merged 13 commits into from
Dec 29, 2023

Conversation

HannanNaeem
Copy link
Contributor

@HannanNaeem HannanNaeem commented Dec 18, 2023

This PR removes dependence on inspect library for type inference pipeline. This restructure includes:

  • Reading of types now happens in the runtime object in runtime.py using the parser.
  • This means that the parser is now initialized first in runtime.py using the compiler object already available
  • Original parameters and their annotation are now read from the workunit AST itself.
  • Runtime object now has a cache for the original state of the arguments node in the AST (to reset the arguments for the next call to the workunit)

@HannanNaeem HannanNaeem marked this pull request as draft December 18, 2023 09:15
runtime: replaced copy with pickle
args_type_inference.py: Now has function for checking missing annotations (used in runtime.py)
+ Minor cleanup
@HannanNaeem HannanNaeem marked this pull request as ready for review December 22, 2023 09:51
Copy link
Contributor

@NaderAlAwar NaderAlAwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good so far. I might have more comments when you move the code from runtime

pykokkos/core/runtime.py Show resolved Hide resolved
pykokkos/core/runtime.py Outdated Show resolved Hide resolved
pykokkos/core/type_inference/args_type_inference.py Outdated Show resolved Hide resolved
pykokkos/core/type_inference/args_type_inference.py Outdated Show resolved Hide resolved
pykokkos/core/type_inference/args_type_inference.py Outdated Show resolved Hide resolved
pykokkos/interface/parallel_dispatch.py Outdated Show resolved Hide resolved
Copy link
Contributor

@NaderAlAwar NaderAlAwar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@NaderAlAwar NaderAlAwar merged commit e49fdf0 into kokkos:main Dec 29, 2023
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants