pytorch/torchgen
Mikayla Gawarecki e65ab9a868 Enable generating generic c_shim that doesn't bypass dispatcher (#158974)
Adds `c_shim_aten.{h/cpp}` and use this for `fill_`

This is the generated `c_shim_aten.cpp` for reference

```cpp

// WARNING: THIS FILE IS AUTOGENERATED BY torchgen. DO NOT MODIFY BY HAND.
// See 7e86a7c015/torchgen/gen.py (L2424-L2436) for details

// This file corresponds to the aten_shimified_ops list in torchgen/aoti/fallback_ops.py

#include <torch/csrc/inductor/aoti_torch/generated/c_shim_aten.h>
#include <torch/csrc/inductor/aoti_torch/utils.h>

#ifndef AT_PER_OPERATOR_HEADERS
#include <ATen/Functions.h>
#include <ATen/CompositeExplicitAutogradFunctions.h>
#include <ATen/CompositeExplicitAutogradNonFunctionalFunctions.h>
#include <ATen/CompositeImplicitAutogradFunctions.h>
#else
#include <ATen/ops/fill.h>

#endif // AT_PER_OPERATOR_HEADERS

using namespace torch::aot_inductor;

AOTITorchError aoti_torch_aten_fill__Scalar(AtenTensorHandle self, double value) {
    AOTI_TORCH_CONVERT_EXCEPTION_TO_ERROR_CODE({
        at::fill_(
            *tensor_handle_to_tensor_pointer(self), value
        );
```

Pull Request resolved: https://github.com/pytorch/pytorch/pull/158974
Approved by: https://github.com/albanD, https://github.com/janeyx99
2025-07-25 21:59:14 +00:00
..
_autoheuristic [BE] fix typos in torchgen/ (#156083) 2025-06-17 19:25:50 +00:00
aoti Enable generating generic c_shim that doesn't bypass dispatcher (#158974) 2025-07-25 21:59:14 +00:00
api Revert "Use std::string_view in torchgen (#157050)" 2025-06-30 18:08:54 +00:00
decompositions Revert "Use absolute path path.resolve() -> path.absolute() (#129409)" 2025-01-04 14:17:20 +00:00
dest Revert "Use std::string_view in torchgen (#157050)" 2025-06-30 18:08:54 +00:00
fuse
operator_versions [3/N] Use internal linkage in C++ files (#151297) 2025-05-05 17:48:39 +00:00
selective_build
shape_functions [BE] fix typos in torchgen/ (#156083) 2025-06-17 19:25:50 +00:00
static_runtime Revert "Use std::string_view in torchgen (#157050)" 2025-06-30 18:08:54 +00:00
__init__.py
BUCK.oss
BUILD.bazel
build.bzl Revert "[CI] update flake8 and mypy lint dependencies (#158720)" 2025-07-21 13:58:50 +00:00
code_template.py [BE] Ensure generated stub files by gen_pyi are properly formatted (#150730) 2025-05-17 12:30:40 +00:00
context.py [2/N] Apply py39 ruff fixes (#141938) 2024-12-05 06:26:06 +00:00
gen_aoti_c_shim.py Enable generating generic c_shim that doesn't bypass dispatcher (#158974) 2025-07-25 21:59:14 +00:00
gen_backend_stubs.py [BE][CI] bump ruff to 0.9.2: multiline assert statements (#144546) 2025-02-27 20:46:16 +00:00
gen_functionalization_type.py [BE] fix typos in torchgen/ (#156083) 2025-06-17 19:25:50 +00:00
gen_lazy_tensor.py [BE][Easy] use pathlib.Path instead of dirname / ".." / pardir (#129374) 2024-12-29 17:23:13 +00:00
gen_schema_utils.py [BE] fix typos in torchgen/ (#156083) 2025-06-17 19:25:50 +00:00
gen_vmap_plumbing.py [BE][CI] bump ruff to 0.9.0: string quote styles (#144569) 2025-02-24 19:56:09 +00:00
gen.py Enable generating generic c_shim that doesn't bypass dispatcher (#158974) 2025-07-25 21:59:14 +00:00
local.py [BE][CI] bump ruff to 0.9.2: multiline assert statements (#144546) 2025-02-27 20:46:16 +00:00
model.py [MPS] Add boilerplate sparse code support (#157238) 2025-06-30 01:53:45 +00:00
native_function_generation.py [aotd] capture rrelu_with_noise noise mutation in compile (#141867) 2024-12-04 12:18:58 +00:00
utils.py [torchgen] Refactor torchgen.utils.FileManager to accept pathlib.Path (#150726) 2025-05-15 02:52:24 +00:00
yaml_utils.py [BE][CI] bump ruff to 0.9.2: multiline assert statements (#144546) 2025-02-27 20:46:16 +00:00