mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
Summary: Follow up to https://github.com/pytorch/pytorch/issues/68095 This also changes the files from the ATen folder to include c10's `Export.h` instead since they can't ever be exporting `TORCH_PYTHON_API`. cc pietern mrshenli pritamdamania87 zhaojuanmao satgera rohan-varma gqchen aazzolini osalpekar jiayisuse SciPioneer H-Huang Pull Request resolved: https://github.com/pytorch/pytorch/pull/69585 Reviewed By: mrshenli Differential Revision: D32958594 Pulled By: albanD fbshipit-source-id: 1ec7ef63764573fa2b486928955e3a1172150061
31 lines
832 B
C++
31 lines
832 B
C++
#pragma once
|
|
|
|
#include <torch/csrc/Export.h>
|
|
#include <torch/csrc/jit/codegen/fuser/arg_spec.h>
|
|
#include <torch/csrc/jit/codegen/fuser/partition_desc.h>
|
|
#include <torch/csrc/jit/codegen/fuser/tensor_desc.h>
|
|
#include <torch/csrc/jit/ir/ir.h>
|
|
|
|
#include <iostream>
|
|
#include <string>
|
|
#include <tuple>
|
|
#include <vector>
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
namespace fuser {
|
|
|
|
// Creates a CPU or CUDA kernel for the given graph.
|
|
// Returns the C++ or CUDA string implementing the kernel.
|
|
TORCH_API std::string generateKernel(
|
|
const std::string& name,
|
|
const Graph& graph,
|
|
const std::vector<std::pair<const Value*, const c10::optional<TensorDesc>>>&
|
|
inputs,
|
|
const std::vector<std::pair<const Value*, const TensorDesc>>& outputs,
|
|
const bool use_cuda);
|
|
|
|
} // namespace fuser
|
|
} // namespace jit
|
|
} // namespace torch
|