[inductor] Add input generation fn option for autotuning (#108242)
Summary: In certain cases, the content of some inputs is important for consistent behavior (and performance signals) of an operator. One example is fbgemm jagged tensor operators where offsets Tensor's content must be consistent with the shape of the values Tensor (i.e. `values.size(0) == offsets[-1]` + monotonicity).
This is particularily important in the context of autotuning, where the inputs are currently generated as random (for float types) or all-zero (for int types) `torch.Tensors`. Even if the extern kernel and Triton tempalte are robust enough to tolerate improper input content, the performance signals would likely be useless.
In this PR, we add an option to pass input-generating functions for a subset of inputs of the autotuned op (to the `AlgorithmSelectorCache.__call__`).
Test Plan:
```
$ python test/inductor/test_max_autotune.py
...
----------------------------------------------------------------------
Ran 17 tests in 80.146s
OK
```
Reviewers:
Subscribers:
Tasks:
Tags:
Differential Revision: [D48831225](https://our.internmc.facebook.com/intern/diff/D48831225)
Pull Request resolved: https://github.com/pytorch/pytorch/pull/108242
Approved by: https://github.com/jansel