Code Monkey home page Code Monkey logo

sionnx's Introduction

SIONNX

License

Introduction

Sionnx is a tool to automatically generate tests for ONNX compliance. It's originated from Sinian project and can generate compliance tests with configurable settings for ONNX runtime. The generated tests can be exported to protobuf format to be compatible with many ONNX runtime frameworks.

Sionnx includes a DSL to describe ONNX instrucitons. It leverages LLVM TableGen toolchain to parse the DSL files and generate tests in Python. The TableGen is customized to handle the DSL syntax.

Sinian is Alibaba’s heterogeneous hardware acceleration and optimization platform, targeting extreme performance and high execution efficiency for machine learning and data-intensive applications. Sinian is a unified platform to support both machine learning training and inferencing, but fully tailorable statically for cloud computing, edge computing, and IoT devices. Sinian makes it seamless to build, train, and deploy machine learning models without suffering the loss of performance portability.

sinian sionnx

Getting Started

Build From Source

Generate unit ONNX tests:

  • cd sionnx/scripts
  • python generate_tests.py (-profile_level: 0=smoke tests; 1=full tests. Default is 0)
  • Generated tests are under folder sionnx/scripts/tests.

Export Tests as Model File + Data Files:

  • Prerequisite: Download ONNX(https://github.com/onnx/onnx) source code.
  • cd sionnx/scripts
  • python export.py #onnx_path#(the absolute root path of onnx source code).

Support A New Op:

  1. Add/modify .td file in include/.
  2. Add .algorithm file(written in numpy) in include/.
  3. Update llvm/utils/TableGen/OnnxTestsEmitter.cpp if necessary.
  4. Build.

Documentation

Sionnx: Automatic Unit Test Generator for ONNX Conformance: https://arxiv.org/abs/1906.05676

License

Copyright (C) 2017-2019 Alibaba Group Holding Limited

Licensed 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

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

sionnx's People

Contributors

weifengzhang19 avatar xinlicai avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

sionnx's Issues

profile_level: 0=smoke tests; 1=full tests doesnt work with onnx rel-1.6.0

Hello,

I tried to generate tests with onnx rel-1.6.0 (after onnx clone I checked out rel-1.6.0) but, in this configuration, it seems that profile_level option doesn't work. If I run generate_tests.py, with -profile_level 0 or -profile_level 1, I always obtain 572 tests.

It seems that onnx_*.py scripts under scripts/tests are correct (i.e. multiple make_node invocation are present if -profile_level 1 is selected, one or less make_node invocation is present otherwise) but then always 572 tests are found in exported folder.

Instead with last onnx version (1.7) things appear to work ok (4351 tests in smoke case 5671 in full mode)

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.