pytorch/torch/_higher_order_ops
Yidi Wu fc859077a0 [export][cond] support merging constant ints as unbacked symint (#152742)
@pianpwk points out that this will be helpful to address several data dependent issues in huggingface [models](e23705e557/src/diffusers/schedulers/scheduling_euler_ancestral_discrete.py (L332)) with the following pattern:
```python
idx = return 0 if u0 else return 1
return  x[idx]
```
We could preserve the conditional with a cond.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/152742
Approved by: https://github.com/zou3519
2025-05-22 17:25:38 +00:00
..
__init__.py [export][cond] support merging constant ints as unbacked symint (#152742) 2025-05-22 17:25:38 +00:00
_invoke_quant.py [BaseHOP] change hop(subgraph, operands) to hop(subgraph, *operands) (#146730) 2025-02-20 02:30:36 +00:00
aoti_call_delegate.py [export] Make aoti_call_delegate hop traceable (#148804) 2025-04-03 20:44:31 +00:00
associative_scan.py [HOP] Mutation and alias rework (#146658) 2025-05-18 08:05:22 +00:00
auto_functionalize.py auto functionalize base_hop (#151067) 2025-05-21 18:55:46 +00:00
base_hop.py [hop_schema] add HopSchemaGenerator to make it easier to create hop schema (#152974) 2025-05-21 18:55:46 +00:00
cond.py [export][cond] support merging constant ints as unbacked symint (#152742) 2025-05-22 17:25:38 +00:00
effects.py Revert "Improve torch.ops typing (#153558)" 2025-05-19 23:32:36 +00:00
executorch_call_delegate.py [HOP] Reworked DispatchKey.Autograd (#151107) 2025-04-15 19:55:46 +00:00
flat_apply.py [dynamo] Make nonstrict_trace work with some pytree.register_constant-ed instances (#148007) 2025-03-05 21:28:26 +00:00
flex_attention.py [HOP] Mutation and alias rework (#146658) 2025-05-18 08:05:22 +00:00
foreach_map.py [BaseHOP] change hop(subgraph, operands) to hop(subgraph, *operands) (#146730) 2025-02-20 02:30:36 +00:00
hints_wrap.py [HOP] Mutation and alias rework (#146658) 2025-05-18 08:05:22 +00:00
invoke_subgraph.py [hop_schema] support gen_schema for invoke_subgraph (#152984) 2025-05-21 18:55:46 +00:00
map.py [map] add inductor support by lowering to while_loop (#150971) 2025-05-21 22:19:47 +00:00
out_dtype.py [HOP] Reworked DispatchKey.Autograd (#151107) 2025-04-15 19:55:46 +00:00
run_const_graph.py [HOP] Reworked DispatchKey.Autograd (#151107) 2025-04-15 19:55:46 +00:00
scan.py [HOP] Mutation and alias rework (#146658) 2025-05-18 08:05:22 +00:00
schema.py [hop_schema] support gen_schema for invoke_subgraph (#152984) 2025-05-21 18:55:46 +00:00
strict_mode.py [HOP] Reworked DispatchKey.Autograd (#151107) 2025-04-15 19:55:46 +00:00
torchbind.py [HOP] Reworked DispatchKey.Autograd (#151107) 2025-04-15 19:55:46 +00:00
triton_kernel_wrap.py Revert "has_triton: Use the device interface for detecting Triton availability (#139171)" 2025-05-10 14:46:23 +00:00
utils.py [export][cond] support merging constant ints as unbacked symint (#152742) 2025-05-22 17:25:38 +00:00
while_loop.py [HOP] Mutation and alias rework (#146658) 2025-05-18 08:05:22 +00:00
wrap.py Add a HOP to bypass tracing of a wrapper function while tracing the wrapped function (#153487) 2025-05-22 04:24:38 +00:00