Use fully qualified name as tp_name for tensors and storages#1379
Merged
colesbury merged 1 commit intopytorch:masterfrom Apr 27, 2017
Merged
Use fully qualified name as tp_name for tensors and storages#1379colesbury merged 1 commit intopytorch:masterfrom
colesbury merged 1 commit intopytorch:masterfrom
Conversation
Member
Author
|
An alternative way of achieving the same effect would be to define the concrete Tensor and Storage classes in C instead of Python, but you'd be basically doing the same thing: setting the |
apaszke
reviewed
Apr 27, 2017
torch/csrc/Module.cpp
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/csrc/Module.cpp
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
torch/csrc/utils.cpp
Outdated
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
This comment was marked as off-topic.
This comment was marked as off-topic.
Sorry, something went wrong.
apaszke
approved these changes
Apr 27, 2017
Jiaming-Liu
pushed a commit
to Jiaming-Liu/pytorch
that referenced
this pull request
May 18, 2017
jjsjann123
pushed a commit
to jjsjann123/pytorch
that referenced
this pull request
Jan 26, 2022
* Have Kernel Inherit IrContainer (pytorch#1375) * Kernel<-Fusion Step 1 - Convert ExprSort to StmtSort (pytorch#1376) * Kernel<-Fusion Step 2 - Mutator refactor (pytorch#1377) * Kernel<-Fusion Step 3 - Debug print for expr_eval and type promotion fix (pytorch#1379) * Kernel<-Fusion Step 4 - Have kernel inherit Fusion (pytorch#1380) * Kernel<-Fusion Step 5 - Move lowering passes into their own files (pytorch#1382) * Kernel<-Fusion Step 6 - Remove kir::IrBuilder (pytorch#1383) * Kernel<-Fusion Step 7 - Remove kir functions from ComputeAtMap (pytorch#1384) * Kernel<-Fusion Step 8 - Clean up [lower/executor] utils (pytorch#1387) * Kernel<-Fusion Step 9 - Remove TensorView::fuserTv (pytorch#1388) * Kernel<-Fusion Step 10 - Remove lowerVal/lowerExpr (pytorch#1389) * Kernel<-Fusion Step 11 - Finish cleaning up kir (pytorch#1390)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently, AttributeErrors on tensors and storages are ambiguous. It's unclear if they refer to the CUDA, sparse, or regular CPU classes:
Types defined in C don't have this problem because their
tp_namefield contains the fully qualified name:This changes the
tp_namefield on the Tensor and Storage classes to be their fully qualified name. The__name__attribute is still the "simple" class name, which is necessary for pickling in Python 2. This matches the behavior for types defined in C: