Delete dead Tensor code paths#5417
Merged
colesbury merged 20 commits intopytorch:masterfrom Feb 27, 2018
Merged
Conversation
* PyObject_SetAttrString does NOT steal a reference * fix leak of imported module
- Delete cwrap code for Tensor and generation - Move THNN generation to generate_code.py (use ninja)
- In Python 2.7, the first argument to the module function is null, not the module
gchanan
approved these changes
Feb 26, 2018
|
|
||
| THPObjectPtr parent(PyImport_ImportModule("torch._C")); | ||
| if (!parent) return false; | ||
| PyModule_AddObject(parent.get(), "_functions", module.release()); |
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.
This ensures that the THVector dispatch table is loaded when the shared object is dynamically loaded. This avoids the need for the user to call THVector_(vectorDispatchInit) which we were only doing in the legacy Tensor code.
Member
Author
|
ASAN build seems flaky today. ONNX build passed earlier |
Contributor
|
It seems "tools/cwrap/plugins/THPPlugin.py" should be removed, since no other module imported "class THPPlugin(CWrapPlugin):" |
pytorchmergebot
pushed a commit
that referenced
this pull request
Dec 15, 2023
This check was introduced by #5417 and then turned into a tautology by #10147 So I guess it's time to let go of all that dynamic initialization (and may be just delete it in 2.3?) Pull Request resolved: #115884 Approved by: https://github.com/kit1980
guilhermeleobas
pushed a commit
to guilhermeleobas/pytorch
that referenced
this pull request
Dec 18, 2023
This check was introduced by pytorch#5417 and then turned into a tautology by pytorch#10147 So I guess it's time to let go of all that dynamic initialization (and may be just delete it in 2.3?) Pull Request resolved: pytorch#115884 Approved by: https://github.com/kit1980
dmenig
pushed a commit
to dmenig/pytorch
that referenced
this pull request
Dec 21, 2023
This check was introduced by pytorch#5417 and then turned into a tautology by pytorch#10147 So I guess it's time to let go of all that dynamic initialization (and may be just delete it in 2.3?) Pull Request resolved: pytorch#115884 Approved by: https://github.com/kit1980
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.
This deletes most of the dead Tensor code paths, including the TensorMethods cwrap and generic/Tensor.cpp.
This also moves the THNN.cwrap/.cpp generation to generate_code which can use ninja if installed.