Make PyTorch models up to 40% faster! Thunder is a source to source compiler for PyTorch. It enables using different hardware executors at once; across one or thousands of GPUs.
Apache License 2.0
1.07k
stars
60
forks
source link
Allowing static constraint in torch/__init__.py #613
Adding prims.sink with a DONT_DCE tag to explicitly mark dependency of computation trace on inputs. This allows prologue trace to inject static constraint logic on NumberProxy inputs, which would otherwise not show up in computation trace.
Adding constraint to device index in torch_device.
What does this PR do?
Fixes issues in comment https://github.com/Lightning-AI/lightning-thunder/issues/463#issuecomment-2161258626.
This PR includes:
prims.sink
with a DONT_DCE tag to explicitly mark dependency of computation trace on inputs. This allows prologue trace to inject static constraint logic on NumberProxy inputs, which would otherwise not show up in computation trace.torch_device
.