Implement `__enter__` and `__exit__` for CUDA context
Open
- Dominant language
- Python
- Stars
- 2.1k
- Forks
- 298
- Avg merge
- 4m
- Merged PRs (30d)
- 1
Description
People like me always forgot to pop context and cause errors. By implementing these two methods, the python will handle the context automatically. See https://book.pythontips.com/en/latest/context_managers.html
This also helps when there is an exception.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.