mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-08 07:39:33 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch-canary/pull/2 Pull Request resolved: https://github.com/pytorch/pytorch/pull/66881 Adds `static_runtime::fused_equally_split` operator and removes `is_fused` logic from original operator. Modifies `FuseUnpackListV2` to map `fb::equally_split` to this new operator. Test Plan: ``` adityapillai@5960 /data/sandcastle/boxes/fbsource/fbcode 1m 13s ❯ buck test //caffe2/benchmarks/static_runtime/fb:test_fb_operators ``` and sandcastle strange_what_could_go_wrong Reviewed By: mikeiovine Differential Revision: D31742293 fbshipit-source-id: 60b35589c8817719b005d49811f575b6590d1c39
39 lines
899 B
C++
39 lines
899 B
C++
// (c) Facebook, Inc. and its affiliates. Confidential and proprietary.
|
|
|
|
#pragma once
|
|
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
#include <torch/csrc/jit/ir/ir.h>
|
|
#include <torch/csrc/jit/runtime/static/impl.h>
|
|
|
|
namespace c10 {
|
|
struct IValue;
|
|
}
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
|
|
struct Node;
|
|
class StaticModule;
|
|
|
|
namespace test {
|
|
|
|
// Given a model/function in jit or IR script, run the model/function
|
|
// with the jit interpreter and static runtime, and compare the results
|
|
void testStaticRuntime(
|
|
const std::string& source,
|
|
const std::vector<c10::IValue>& args,
|
|
const std::vector<c10::IValue>& args2 = {},
|
|
const bool use_allclose = false,
|
|
const bool use_equalnan = false);
|
|
|
|
std::shared_ptr<Graph> getGraphFromIR(const std::string& ir);
|
|
|
|
bool hasProcessedNodeWithName(torch::jit::StaticModule& smodule, const char *name);
|
|
|
|
} // namespace test
|
|
} // namespace jit
|
|
} // namespace torch
|