Giter Site home page Giter Site logo

tl's Introduction

Tensor Language

Features

Data Type

  • si8/ui8
  • si16/ui16
  • si32/ui32
  • si64/ui64
  • fp32
  • fp64
  • str

Statement

  • assignment statement
  • declaration statement
  • if else statement
  • slice expression
  • + - * /

Display

image

Usage

./tl test.tl --dump_ast --ast_file 1.dot --dump_mlir --mlir_file mlir.txt

MLIR

source code:

si64[32,20] self_add(si64 a,si64 b,si64[22,32]c){
    return a + b * c;
}

MLIR:

"builtin.module"() ({
  "tl.func"() ({
  ^bb0(%arg0: tensor<1xsi8>, %arg1: tensor<1xsi8>, %arg2: tensor<22x32xsi8>):
    %0 = "tl.mul"(%arg1, %arg2) : (tensor<1xsi8>, tensor<22x32xsi8>) -> tensor<*xf64>
    %1 = "tl.add"(%arg0, %0) : (tensor<1xsi8>, tensor<*xf64>) -> tensor<*xf64>
    "tl.return"(%1) : (tensor<*xf64>) -> ()
  }) {function_type = (tensor<1xsi8>, tensor<1xsi8>, tensor<22x32xsi8>) -> tensor<32x20xsi8>, sym_name = "self_add"} : () -> ()
}) : () -> ()

tl's People

Contributors

muzhailong avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.