Comments (4)
Aren't function defaults immutable? If the default value is a ConstantVariable I think we can not guard on it. Though we should still guard if is something that could be mutated.
from pytorch.
Someone could still override the dunder defaults altogether. As shown in the example above. Unlikely but possible.
from pytorch.
This is the kind of thing where I kind of hope dict hooks would have been enough. Maybe that CPython API is not available here though...
from pytorch.
Just to point out, the guard itself is pretty cheap. Its the accessor which is expensive here. So, dict hooks (I am guessing you mean dict versions/tags) wont be enough.
from pytorch.
Related Issues (20)
- Inductor can not fuse cat with a pointwise HOT 2
- [Inductor] Generate triton block pointers for discontiguous strided tensors HOT 7
- `torch.compile` fails with `jacfwd` when multiplying/dividing float and tensor HOT 2
- [Distributed] P2P Operations on NCCL do not respect tag HOT 5
- Triton installation not found. HOT 5
- Broken Docker Image on dockerhub HOT 6
- PyTorch Distributed Load Updates or Returns `state_dict` HOT 7
- RuntimeError: MPS: Unsupported Border padding mode HOT 3
- Further explanation for `batch_isend_irecv` HOT 1
- Bug when indexing 2D tensors using an MPS device HOT 9
- [typing] `nn.Parameter` return type identified as `Tensor` by `pyright`
- Windows: 2.3.0 wheel can not be imported if installed for a single user only HOT 15
- Does torch.nn.Linear check the weights shape before assignment? HOT 3
- doc link failure of `torch.compile` HOT 3
- torch.is_signed on new uint dtypes raises Unknown ScalarType HOT 4
- Can't fine-tune a MeloTTS model on my dataset in Google Colab HOT 1
- FP6 dtype! HOT 1
- DISABLED test_sharded_grad (__main__.TestAutogradWithCompiledAutograd) HOT 1
- binaries/dump_operator_names.cc missing iostream include
- Tensor.abs() gives incorrect results on Complex64 when using MPS HOT 6
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.