Comments (2)
the code
class M(torch.nn.Module):
def forward(self, x, ref_id):
self_id = id(self)
if self_id == ref_id:
x = torch.mul(x, 1.0)
x = torch.add(x, 1.0)
return x
def call_id(self, tx, *args):
if len(args) > 0 and isinstance(args[0], variables.NNModuleVariable):
nn_mod_variable = args[0]
mod = tx.output.get_submodule(nn_mod_variable.module_key)
return variables.ConstantVariable.create(id(mod))
else:
unimplemented(f"call_id with args {args}")
sounds like in general this can be solved if we supported id(self) on objects to be traced.
from pytorch.
Fixed by #127146
from pytorch.
Related Issues (20)
- DISABLED test_pattern_matcher_multi_user_dynamic_shapes_cpu (__main__.DynamicShapesCpuTests) HOT 4
- configure ignores USE_QNNPACK=0 and still looks for third_party/QNNPACK
- Cuda memory error when testing GroupedGemm on a multi-Gpu environment
- CUDA Graph caputre error with `torch.multinomial`
- [Torch.Export] [Regression] Index Put Outputs Fake Tensor in 2.4 (Was Good in 2.3) HOT 4
- DISABLED test_vdd_clamp_dynamic_shapes_cpu (__main__.DynamicShapesCpuTests) HOT 3
- DISABLED test_vdd_clamp_dynamic_shapes_cpu (__main__.DynamicShapesCodegenCpuTests) HOT 4
- torch.compile does not work with test coverage tools HOT 8
- [Inductor] torchchat segmentation fault in int8 using max-autotune HOT 7
- Missing test schedules for multiple test cases in pipelining tests HOT 2
- [torch.compile] AssertionError: expected FunctionType found property when compiling model with PyTorch and TensorRT HOT 2
- TypeError occurs for newly added changes in ``instantiate_device_type_tests()``
- Too many warnging HOT 3
- linalg.lu_factor: LU without pivoting is not implemented on the CPU HOT 13
- Cannot create and distribute array in torch.func.grad HOT 3
- Partitioner doesn't recompute aten.full despite it being in the default_recomputable_ops
- Criptic error on non contiguous input to compiled flex attention HOT 12
- [Break XPU] The newly add test case test_codegen_upcast_to_fp32_upcast fail on XPU.
- DISABLED test_dynamic_toggle (__main__.TestProfiler) HOT 1
- DISABLED test_mutable_custom_op_fixed_layout2_cpu (__main__.CpuTests) HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch.