-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
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
[torch.compile] consider relevant code in compilation cache #11614
Changes from all commits
2caec12
0782f10
db98e50
f2ef7a4
387747c
17f8648
a8eaa49
6baccf5
51b03b1
b8b7217
514b3fa
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1108,6 +1108,13 @@ class IntermediateTensors: | |
|
||
tensors: Dict[str, torch.Tensor] | ||
|
||
def __init__(self, tensors): | ||
# manually define this function, so that | ||
# Dynamo knows `IntermediateTensors()` comes from this file. | ||
# Otherwise, dataclass will generate this function by evaluating | ||
# a string, and we will lose the information about the source file. | ||
self.tensors = tensors | ||
Comment on lines
+1111
to
+1116
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this something that we'll need to do for every There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yes, we need to do this for every |
||
|
||
def __getitem__(self, key: Union[str, slice]): | ||
if isinstance(key, str): | ||
return self.tensors[key] | ||
|
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.
Why not take the whole hash?
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.
this keeps consistent with previous behavior that
VllmConfig.compute_hash
uses 10 chars for the hash key.