mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/35115 This commit runs the newly added tools/clang_format.py on the JIT codebase and includes all of the formatting changes thus produced. Testing: Ran the script, CI. Test Plan: Imported from OSS Reviewed By: eellison Differential Revision: D20568523 Pulled By: SplitInfinity fbshipit-source-id: e09bdb982ccf090eecfb7c7b461b8d0681eef82b
31 lines
846 B
C++
31 lines
846 B
C++
#pragma once
|
|
|
|
#include <torch/csrc/WindowsTorchApiMacro.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
|