Giter Site home page Giter Site logo

knut0815 / taichi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from taichi-dev/taichi

0.0 1.0 0.0 28.72 MB

The Taichi Programming Language

Home Page: http://taichi.graphics

License: MIT License

CMake 3.51% Python 12.38% C++ 76.86% C 0.37% Cuda 6.75% Dockerfile 0.14%

taichi's Introduction

Forum: https://forum.taichi.graphics/

[FAQ]

Documentation Chat taichi-nightly taichi-nightly-cuda-10-0 taichi-nightly-cuda-10-1
Documentation Status Join the chat at https://gitter.im/taichi-dev/Lobby Downloads Downloads Downloads
# CPU only. No GPU/CUDA needed. (Linux, OS X and Windows)
python3 -m pip install taichi-nightly

# With GPU (CUDA 10.0) support (Linux only)
python3 -m pip install taichi-nightly-cuda-10-0

# With GPU (CUDA 10.1) support (Linux only)
python3 -m pip install taichi-nightly-cuda-10-1
Linux (CUDA) OS X Windows
Build Build Status Build Status Build Status
PyPI Build Status Build Status Build status

High-Performance Computation on Sparse Data Structures [Paper] [Video] [Language Details] [Taichi Compiler Developer Installation]

Updates

  • (Dec 3, 2019) v0.2.1 released.
    • Improved type mismatch error message
    • native min/max supprt
    • Tensor access index dimensionality checking
    • Matrix.to_numpy, Matrix.zero, Matrix.identity, Matrix.fill
    • Warning instead of error on lossy stores
    • Added some initial support for cross-referencing local variables in different offloaded blocks.
  • (Nov 28, 2019) v0.2.0 released.
    • More friendly syntax error when passing non-compile-time-constant values to ti.static
    • Systematically resolved the variable name resolution issue
    • Better interaction with numpy:
      • numpy arrays passed as a ti.ext_arr() [examples]
        • i32/f32/i64/f64 data type support for numpy
        • Multidimensional numpy arrays now supported in Taichi kernels
      • Tensor.to_numpy() and Tensor.from_numpy(numpy.ndarray) supported [examples]
      • Corresponding PyTorch tensor interaction will be supported very soon. Now only 1D f32 PyTorch tensors supproted when using ti.ext_arr(). Please use numpy arrays as intermediate buffers for now
    • Indexing arrays with an incorrect number of indices now results in a syntax error
    • Tensor shape reflection: [examples]
      • Tensor.dim() to retrieve the dimensionality of a global tensor
      • Tensor.shape() to retrieve the shape of a global tensor
      • Note the above queries will cause data structures to be materialized
    • struct-for (e.g. for i, j in x) now supports iterating over tensors with non power-of-two dimensions
    • Handy tensor filling: [examples]
      • Tensor.fill(x) to set all entries to x
      • Matrix.fill(x) to set all entries to x, where x can be a scalar or ti.Matrix of the same size
    • Reduced python package size
    • struct-for with grouped indices for better metaprogramming, especially in writing dimensionality-independent code, in e.g. physical simulation: [examples]
for I in ti.grouped(x): # I is a vector of size x.dim() and data type i32
  x[I] = 0
  
# If tensor x is 2D 
for I in ti.grouped(x): # I is a vector of size x.dim() and data type i32
  y[I + ti.Vector([0, 1])] = I[0] + I[1]
# is equivalent to
for i, j in x:
  y[i, j + 1] = i + j
  • (Nov 27, 2019) v0.1.5 released.

    • Better modular programming support
    • Disalow the use of ti.static outside Taichi kernels
    • Documentation improvements (WIP)
    • Codegen bug fixes
    • Special thanks to Andrew Spielberg and KLozes for bug report and feedback.
  • (Nov 22, 2019) v0.1.3 released.

    • Object-oriented programming. [Example]
    • native Python function translation in Taichi kernels:
      • Use print instead of ti.print
      • Use int() instead of ti.cast(x, ti.i32) (or ti.cast(x, ti.i64) if your default integer precision is 64 bit)
      • Use float() instead of ti.cast(x, ti.f32) (or ti.cast(x, ti.f64) if your default float-point precision is 64 bit)
      • Use abs instead of ti.abs
      • Use ti.static_print for compile-time printing
  • (Nov 16, 2019) v0.1.0 released. Fixed PyTorch interface.

  • (Nov 12, 2019) v0.0.87 released.

    • Added experimental Windows support with a [known issue] regarding virtual memory allocation, which will potentially limit the scalability of Taichi programs (If you are a Windows expert, please let me know how to solve this. Thanks!). Most examples work on Windows now.
    • CUDA march autodetection;
    • Complex kernel to override autodiff.
  • (Nov 4, 2019) v0.0.85 released.

    • ti.stop_grad for stopping gradients during backpropagation. [Example];
    • Compatibility improvements on Linux and OS X;
    • Minor bug fixes.
  • (Nov 1, 2019) v0.0.77 released.

    • Python wheels now support OS X 10.14+;
    • LLVM is now the default backend. No need to install gcc-7 or clang-7 anymore. To use legacy backends, export TI_LLVM=0;
    • LLVM compilation speed is improved by 2x;
    • More friendly syntax error messages.
  • (Oct 30, 2019) v0.0.72 released.

    • LLVM GPU backend now as fast as the legacy (yet optimized) CUDA backend. To enable, export TI_LLVM=1;
    • Bug fixes: LLVM struct for list generation.
  • (Oct 29, 2019) v0.0.71 released. LLVM GPU backend performance greatly improved. Frontend compiler now emits readable syntax error messages.

  • (Oct 28, 2019) v0.0.70 released. This version comes with experimental LLVM backends for x86_64 and CUDA (via NVVM/PTX). GPU kernel compilation speed is improved by 10x. To enable, update the taichi package and export TI_LLVM=1.

  • (Oct 24, 2019) Python wheels (v0.0.61) released for Python 3.6/3.7 and CUDA 10.0/10.1 on Ubuntu 16.04+. Contributors of this release include Yuanming Hu, robbertvc, Zhoutong Zhang, Tao Du, Srinivas Kaza, and Kenneth Lozes.

  • (Oct 22, 2019) Added support for kernel templates. Kernel templates allow users to pass in taichi tensors and compile-time constants as kernel parameters.

  • (Oct 9, 2019) Compatibility improvements. Added a basic PyTorch interface. [Example].

Notes:

  • You still need to clone this repo for demo scripts under examples. You do not need to execute install.py or dev_setup.py. After installation using pip you can simply go to examples and execute, e.g., python3 mpm_fluid.py.
  • Make sure you clear your legacy Taichi installation (if applicable) by cleaning the environment variables (delete TAICHI_REPO_DIR, and remove legacy taichi from PYTHONPATH) in your .bashrc or .zshrc. Or you can simply do this in your shell to temporarily clear them:
export PYTHONPATH=
export TAICHI_REPO_DIR=

The Taichi Library [Legacy branch]

Taichi is an open-source computer graphics library that aims to provide easy-to-use infrastructures for computer graphics R&D. It's written in C++14 and wrapped friendly with Python.

News

taichi's People

Contributors

yuanming-hu avatar bachili avatar aekul avatar squarefk avatar fksquare avatar flynneva avatar 0xflotus avatar beaugunderson avatar jgfuchs avatar animatedrng avatar gitter-badger avatar ljcc0930 avatar ziyinq avatar

Watchers

James Cloos 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.