[JIT] Move UseVariadicCat internals (#63577)
authorMike Iovine <mikeiovine@fb.com>
Tue, 24 Aug 2021 00:26:27 +0000 (17:26 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Tue, 24 Aug 2021 00:30:36 +0000 (17:30 -0700)
commitfc6dd0bc008d1a1872626567506be6e9e5dcbae1
tree88246039fac2162b2df333c31c5235c316bf8941
parent130549d61ba34f3d70167be3dc88631385112625
[JIT] Move UseVariadicCat internals (#63577)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63577

Since other variadic ops will have an almost identical implementation, we can generalize the `UseVariadicCat` implementation and put it in a common folder.

Also moved some test utilities that other variadic op tests will likely need.

Test Plan: `buck test caffe2/test/cpp/jit:jit -- ConcatOptTest`

Reviewed By: navahgar

Differential Revision: D30409937

fbshipit-source-id: 925c11c27b58ce98cb8368d2a205e26ba66d3db9
test/cpp/jit/test_concat_opt.cpp
test/cpp/jit/test_utils.cpp
test/cpp/jit/test_utils.h
tools/build_variables.bzl
torch/csrc/jit/passes/concat_opt.cpp
torch/csrc/jit/passes/concat_opt.h
torch/csrc/jit/passes/variadic_ops.cpp [new file with mode: 0644]
torch/csrc/jit/passes/variadic_ops.h [new file with mode: 0644]
torch/csrc/jit/runtime/static/impl.cpp