pytorch/tools/jit/templates/external_functions_codegen_template.cpp
Horace He 31607ad41d [nnc] Started codegenning some external calls (#58118)
Summary:
Currently only supports native ops that have all tensor arguments, an out variant, and no kwargs.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/58118

Reviewed By: ejguan

Differential Revision: D28421323

Pulled By: Chillee

fbshipit-source-id: 1c75c900415deca63fcc0e496e3bac126f21bf49
2021-05-13 19:56:50 -07:00

30 lines
523 B
C++

// ${generated_comment}
#include <torch/csrc/jit/tensorexpr/external_functions.h>
#include <ATen/Functions.h>
#include <ATen/NativeFunctions.h>
#include <c10/util/irange.h>
#include <torch/csrc/jit/tensorexpr/external_functions_registry.h>
namespace torch {
namespace jit {
namespace tensorexpr {
#ifdef C10_MOBILE
extern "C" {
#endif
${external_functions}
#ifndef C10_MOBILE
${external_registrations}
#endif
#ifdef C10_MOBILE
} // extern "C"
#endif
} // namespace tensorexpr
} // namespace jit
} // namespace torch