-
Notifications
You must be signed in to change notification settings - Fork 110
Add LruFusionCache when direct bindings is used #2806
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
base: main
Are you sure you want to change the base?
Conversation
kshitij12345
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks @rdspring1
| # by nvfuserex.py when nvFuser is available. | ||
|
|
||
| DIRECT_BINDINGS_SUPPORTED_VERSION = LooseVersion("0.2.34") | ||
| DIRECT_BINDINGS_SUPPORTED_VERSION = LooseVersion("0.2.35") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this the minimum version which ships with LruFusionCache?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes
| return func | ||
| from nvfuser_direct import LruFusionCache | ||
|
|
||
| return LruFusionCache(max_fusions=16384)(func) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Default value for max_fusions is 16384, we can remove this here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
qq: will there be an option of setting cache size? Or it would not be that useful
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually we pick a reasonable number to avoid out-of-memory issues. We never thought to change it at runtime.
This PR enables an LRU Fusion Cache decorator for direct bindings to address issue #2700.
scale operations, which create non-trivial allocation domains.