mirror of https://github.com/llvm/torch-mlir
18 lines
444 B
Python
18 lines
444 B
Python
# -*- Python -*-
|
|
# This file is licensed under a pytorch-style license
|
|
# See frontends/pytorch/LICENSE for license information.
|
|
|
|
import torch
|
|
import npcomp.frontends.pytorch as torch_mlir
|
|
import npcomp.frontends.pytorch.test as test
|
|
|
|
# RUN: python %s | FileCheck %s
|
|
|
|
dev = torch_mlir.mlir_device()
|
|
|
|
model = torch.nn.Linear(1024,16).to(dev)
|
|
tensor = torch.randn(4,1024).to(dev)
|
|
|
|
# CHECK: PASS! fwd check
|
|
fwd_path = test.check_fwd(model, tensor)
|