mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[JIT] fix resolving of functions in torch/functional. fix compilation of torch.stft (#33504)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/33504 Fix resolution fo functions that are bound onto torch in torch/functional.py. This does not fix compilation of all of those functions, those will be done in follow ups. Does torch.stft as a start. Fixes #21478 Test Plan: Imported from OSS Differential Revision: D20014591 Pulled By: eellison fbshipit-source-id: bb362f1b5479adbb890e72a54111ef716679d127
This commit is contained in:
committed by
Facebook Github Bot
parent
057fd5e10d
commit
fddf73250d
14
torch/_VF.py
Normal file
14
torch/_VF.py
Normal file
@ -0,0 +1,14 @@
|
||||
import torch
|
||||
import sys
|
||||
import types
|
||||
|
||||
|
||||
class VFModule(types.ModuleType):
|
||||
def __init__(self, name):
|
||||
super(VFModule, self).__init__(name)
|
||||
self.vf = torch._C._VariableFunctions
|
||||
|
||||
def __getattr__(self, attr):
|
||||
return getattr(self.vf, attr)
|
||||
|
||||
sys.modules[__name__] = VFModule(__name__)
|
Reference in New Issue
Block a user