pytorch/torch/_dynamo/variables
Shunting Zhang bbded928b3 [innductor] make inductor work with new triton compile interface (#115878)
Recent 2 triton PRs (https://github.com/openai/triton/pull/2701, https://github.com/openai/triton/pull/2756) change the interface for triton.compile, this PR added the necessary change on inductor side to work with both old and new compile API.

Also there is some simplification between compilation call in subprocess and the one in main process
- previously we pass warm_cache_only=True if the compilation happens in subprocess. But triton never use that argument in the currently used pin. So I removed that
- previously we only pass compute_capability if compilation happens in subprocess. The PR change that to always passing compute_capability to triton.compile no matter if the compilation happens in main or sub process.

Updated:
There are more interface change from triton side. E.g.
- tl.math.{min, max} now requires a propagate_nan argument
- JITFunction.run now requires a warmup argument. This affect the benchmarking phase of matmul max-autotune; on the other hand, JITFunction.run forbids stream argument now. Simply removing passing this in when benchmarking matmul triton kernel will work for both old and new version of triton.
- triton Autotuner change attribute name from 'warmup' to 'num_warmup' and from 'rep' to 'num_rep'. This cause dynamo failed to handle triton Autotuner object since dynamo TritonKernelVariable makes assumption about attribute names. It's used in some test cases that a model call triton Autotuner directly.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/115878
Approved by: https://github.com/jansel
2023-12-21 00:03:38 +00:00
..
__init__.py [Dynamo][8/N] Wrap itertools.* as ItertoolsVariable (#115802) 2023-12-16 01:42:02 +00:00
base.py Remove replace_all and make VTs mutable (#113725) 2023-12-10 09:31:21 +00:00
builder.py Revert "[Dynamo][9/N] Make SkipFilesVariable wrap functions only (#115963)" 2023-12-20 12:06:55 +00:00
builtin.py add support for dynamic shapes in round (#115259) 2023-12-19 15:45:50 +00:00
constant.py [dynamo] Improve support for dynamic shapes str.format and _assert (#115203) 2023-12-06 04:54:45 +00:00
ctx_manager.py [contextlib] Wrapping a function with set_grad_enabled will consume its global mutation (#113359) 2023-11-09 19:16:20 +00:00
dicts.py Remove replace_all and make VTs mutable (#113725) 2023-12-10 09:31:21 +00:00
distributed.py [DeviceMesh] Rename _device_mesh.py to device_mesh.py to prepare for beta (#115099) (#115193) 2023-12-08 08:44:32 +00:00
functions.py [innductor] make inductor work with new triton compile interface (#115878) 2023-12-21 00:03:38 +00:00
higher_order_ops.py Add support for torch.cond in vmap (#114523) 2023-12-20 19:54:38 +00:00
iter.py [Dynamo][8/N] Wrap itertools.* as ItertoolsVariable (#115802) 2023-12-16 01:42:02 +00:00
lazy.py [dynamo] Remove VariableTracker.propagate (#111726) 2023-11-07 19:55:19 +00:00
lists.py Remove replace_all and make VTs mutable (#113725) 2023-12-10 09:31:21 +00:00
misc.py Revert "[Dynamo][9/N] Make SkipFilesVariable wrap functions only (#115963)" 2023-12-20 12:06:55 +00:00
nn_module.py Remove replace_all and make VTs mutable (#113725) 2023-12-10 09:31:21 +00:00
optimizer.py Remove replace_all and make VTs mutable (#113725) 2023-12-10 09:31:21 +00:00
tensor.py Add support for torch.cond in vmap (#114523) 2023-12-20 19:54:38 +00:00
torch_function.py Ensure wrapping subclasses with as_subclass is supported (#116091) 2023-12-20 14:37:08 +00:00
torch.py [Dynamo][7/N] Wrap python modules under torch as regular PythonModuleVariable (#115724) 2023-12-13 21:23:14 +00:00
user_defined.py Revert "[Dynamo][9/N] Make SkipFilesVariable wrap functions only (#115963)" 2023-12-20 12:06:55 +00:00