Skip to content

Delete dead Tensor code paths#5417

Merged
colesbury merged 20 commits intopytorch:masterfrom
colesbury:cleanup
Feb 27, 2018
Merged

Delete dead Tensor code paths#5417
colesbury merged 20 commits intopytorch:masterfrom
colesbury:cleanup

Conversation

@colesbury
Copy link
Member

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.


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.

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.
@colesbury
Copy link
Member Author

ASAN build seems flaky today. ONNX build passed earlier

@colesbury colesbury merged commit 48a3349 into pytorch:master Feb 27, 2018
@colesbury colesbury deleted the cleanup branch February 27, 2018 22:58
@sakaia
Copy link
Contributor

sakaia commented Jun 27, 2018

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants