mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-15 21:00:47 +00:00
Summary: This adds a C++ function `debugGetFusedKernelCode` as well as a Python binding `_jit_fuser_get_fused_kernel_code` that will, given a FusionGroup graph and a set of specified inputs, return the compiled kernel source code. We can then check the contents of this source code for verification of the fuser codegen backend. Pull Request resolved: https://github.com/pytorch/pytorch/pull/18884 Differential Revision: D14795508 Pulled By: jamesr66a fbshipit-source-id: 8f6e9dd13ebbb517737d893b0b5f5e9aa06af124
23 lines
548 B
C++
23 lines
548 B
C++
#pragma once
|
|
|
|
#include <ATen/core/stack.h>
|
|
#include <torch/csrc/WindowsTorchApiMacro.h>
|
|
#include <torch/csrc/jit/fuser/fused_kernel.h>
|
|
#include <torch/csrc/jit/fuser/kernel_spec.h>
|
|
|
|
#include <cstdint>
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
namespace fuser {
|
|
|
|
// Runs the fusion associated with the key (see registerFusion() in interface.h)
|
|
// on the inputs taken from the given Stack.
|
|
TORCH_API bool runFusion(
|
|
const int64_t key,
|
|
Stack& stack,
|
|
std::string* code_out = nullptr);
|
|
|
|
} // namespace fuser
|
|
} // namespace jit
|
|
} // namespace torch
|