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

Allow concurrent kernel execution in multithreaded environments by releasing the GIL #233

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pykokkos/core/translators/bindings.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,8 @@ def generate_functor_instance(functor: str, members: PyKokkosMembers, with_rando

constructor: str = f"{functor} {Keywords.Instance.value}"
constructor += "(" + ",".join(args) + ");"

return mirror_views + constructor
gil_release = "pybind11::gil_scoped_release release;"
return gil_release + mirror_views + constructor

def generate_copy_back_from_dict(members: PyKokkosMembers,deep_copy_args: Dict[str,str]) -> str:
"""
Expand Down