mirror of https://github.com/llvm/torch-mlir
Move tests around so we can have dedicated tests for the c10 dispatcher.
* Adds a trivial missing test for _torch_mlir.c10.get_registered_ops() * Disables the regression tests for now on c10 (until implemented).pull/60/head
parent
6e6efb2854
commit
0cb28f0b06
|
@ -1,3 +1,7 @@
|
||||||
|
llvm_canonicalize_cmake_booleans(
|
||||||
|
NPCOMP_ENABLE_TORCH_TYPE_DISPATCH
|
||||||
|
)
|
||||||
|
|
||||||
configure_lit_site_cfg(
|
configure_lit_site_cfg(
|
||||||
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
|
${CMAKE_CURRENT_SOURCE_DIR}/lit.site.cfg.py.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
|
${CMAKE_CURRENT_BINARY_DIR}/lit.site.cfg.py
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
# TODO: Enable these tests for the new c10 dispatch code path with pt > 1.3
|
||||||
|
if config.enable_c10_dispatch:
|
||||||
|
config.unsupported = True
|
|
@ -0,0 +1,11 @@
|
||||||
|
# -*- Python -*-
|
||||||
|
# This file is licensed under a pytorch-style license
|
||||||
|
# See frontends/pytorch/LICENSE for license information.
|
||||||
|
# RUN: python %s | FileCheck %s
|
||||||
|
|
||||||
|
import _torch_mlir
|
||||||
|
|
||||||
|
# This check is just for a built-in op that is unlikely to change (and is
|
||||||
|
# otherwise insignificant).
|
||||||
|
# CHECK: {'name': ('aten::mul', 'Tensor'), 'is_vararg': False, 'is_varret': False, 'is_mutable': False, 'arguments': [{'name': 'self', 'type': 'Tensor', 'pytype': 'Tensor'}, {'name': 'other', 'type': 'Tensor', 'pytype': 'Tensor'}], 'returns': [{'name': '', 'type': 'Tensor', 'pytype': 'Tensor'}]}
|
||||||
|
print('\n\n'.join([repr(r) for r in _torch_mlir.c10.get_registered_ops()]))
|
|
@ -0,0 +1,2 @@
|
||||||
|
if not config.enable_c10_dispatch:
|
||||||
|
config.unsupported = True
|
|
@ -34,6 +34,7 @@ config.llvm_host_triple = '@LLVM_HOST_TRIPLE@'
|
||||||
config.host_arch = "@HOST_ARCH@"
|
config.host_arch = "@HOST_ARCH@"
|
||||||
config.npcomp_src_root = "@CMAKE_SOURCE_DIR@"
|
config.npcomp_src_root = "@CMAKE_SOURCE_DIR@"
|
||||||
config.npcomp_obj_root = "@CMAKE_BINARY_DIR@"
|
config.npcomp_obj_root = "@CMAKE_BINARY_DIR@"
|
||||||
|
config.enable_c10_dispatch = not @NPCOMP_ENABLE_TORCH_TYPE_DISPATCH@
|
||||||
|
|
||||||
# Support substitution of the tools_dir with user parameters. This is
|
# Support substitution of the tools_dir with user parameters. This is
|
||||||
# used when we can't determine the tool dir at configuration time.
|
# used when we can't determine the tool dir at configuration time.
|
||||||
|
|
Loading…
Reference in New Issue