This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | $ ti test_verbose | |
| [T 02/07/20 06:58:09.802] [logging.cpp:Logger@68] Taichi core started. Thread ID = 14291 | |
| [Taichi version 0.4.4, cpu only, commit c042fba7] | |
| ******************************************* | |
| ** Taichi Programming Language ** | |
| ******************************************* | |
| Running python tests... | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import os | |
| import numpy as np | |
| import tvm | |
| from tvm import relay | |
| import torch | |
| import torch.nn as nn | |
| import torch.nn.functional as F | |
| from torch.quantization import QuantStub, DeQuantStub | |
| from torch.quantization import default_qconfig | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | import numpy as np | |
| import torch | |
| import tvm | |
| from tvm import relay | |
| from torchvision import models | |
| from torch_frontend import parse_script_module | |
| class WrapperModule(torch.nn.Module): | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from collections import OrderedDict | |
| from itertools import product | |
| import torch | |
| import numpy as np | |
| from torchvision import models | |
| import unittest | |
| import random | |
| def set_rng_seed(seed): | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | In [9]: pt_result[0][:10] | |
| Out[9]: | |
| array([-1.8651257, 0.6217086, 1.0102764, 0.8548493, 0.8548493, | |
| -0.6217086, 0.6994221, 0.3108543, -0.9325628, -0.4662814], | |
| dtype=float32) | |
| In [10]: tvm_result[0][:10] | |
| Out[10]: | |
| array([-1.8651257, 0.6217086, 1.0102764, 0.9325628, 0.8548493, | |
| -0.6994221, 0.6217086, 0.3108543, -0.9325628, -0.543995 ], | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | WARNING: The TensorFlow contrib module will not be included in TensorFlow 2.0. | |
| For more information, please see: | |
| * https://github.com/tensorflow/community/blob/master/rfcs/20180907-contrib-sunset.md | |
| * https://github.com/tensorflow/addons | |
| If you depend on functionality not listed there, please file an issue. | |
| v0.0.4 | |
| type tensor_int16_t { | |
| tensor_nil_int16, | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | v0.0.4 | |
| def @main(%X: Tensor[(10, 10, 4), float32], %v26: Tensor[(4, 4), float32], %v25: Tensor[(4), float32]) -> Tensor[(10, 4), float32] { | |
| %0 = full(0 /* ty=int32 */, shape=[10, 4], dtype="float32") /* ty=Tensor[(10, 4), float32] */; | |
| %1 = full(0 /* ty=int32 */, shape=[10, 4], dtype="float32") /* ty=Tensor[(10, 4), float32] */; | |
| %14 = ( | |
| let %while_loop: fn (int32, Tensor[(10, 4), float32], Tensor[(10, 4), float32]) -> (int32, Tensor[(10, 4), float32], Tensor[(10, 4), float32]) = fn (%i.1: int32, %y.5: Tensor[(10, 4), float32], %h.5: Tensor[(10, 4), float32]) -> (int32, Tensor[(10, 4), float32], Tensor[(10, 4), float32]) { | |
| %2 = less(%i.1, 10 /* ty=int32 */) /* ty=bool */; | |
| if (%2) { | |
| %3 = add(%i.1, 1 /* ty=int32 */) /* ty=int32 */; | |
| %4 = take(%X, %i.1, axis=0) /* ty=Tensor[(10, 4), float32] */; | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | v0.0.4 | |
| type u { | |
| c0((int32, u[])), | |
| c1(()), | |
| } | |
| def @main(%q: u[]) -> int32 { | |
| @fn(%q) /* ty=int32 */ | |
| } | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | graph(%self : __torch__.RNNLoop, | |
| %xs.1 : Tensor): | |
| %2 : bool = prim::Constant[value=1]() # dynamic_test.py:133:8 | |
| %3 : None = prim::Constant() | |
| %4 : int = prim::Constant[value=10]() # dynamic_test.py:132:27 | |
| %5 : int = prim::Constant[value=4]() # dynamic_test.py:132:31 | |
| %6 : int = prim::Constant[value=0]() # dynamic_test.py:133:31 | |
| %7 : int[] = prim::ListConstruct(%4, %5) | |
| %h.1 : Tensor = aten::zeros(%7, %3, %3, %3, %3) # dynamic_test.py:132:15 | |
| %9 : int[] = prim::ListConstruct(%4, %5) | 
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | # Licensed to the Apache Software Foundation (ASF) under one | |
| # or more contributor license agreements. See the NOTICE file | |
| # distributed with this work for additional information | |
| # regarding copyright ownership. The ASF licenses this file | |
| # to you under the Apache License, Version 2.0 (the | |
| # "License"); you may not use this file except in compliance | |
| # with the License. You may obtain a copy of the License at | |
| # | |
| # http://www.apache.org/licenses/LICENSE-2.0 | |
| # |