Git Product home page Git Product logo

tachyon's Introduction







Overview

Tachyon is a Modular ZK Backend, powered by GPU.

Design Goals

  1. General Purpose: A versatile ZK library empowers developers to implement any proving scheme with minimal effort, often enhancing developer productivity. To create a general-purpose backend, aligning the code structure as closely as possible with the algebraic structure is paramount.
  2. Easy to Use: Achieving widespread adoption is essential for the success of any product. Consequently, one of the key focal points of the Tachyon project is to include offering packages for various programming languages and runtimes.
  3. Blazing Fast: Tachyon's foremost requirement is speed, and not just any speed, but blazing speed! This entails Tachyon delivering exceptional performance on both CPU and GPU platforms.
  4. GPU Interoperability: Tachyon's code is designed to be compatible with both CPU and GPU in the majority of scenarios.

Prerequisites

Bazel

Please follow the instructions here.

Ubuntu

> sudo apt install libgmp-dev libomp-dev

Macos

> brew install gmp

Getting started

Build

Build on Linux

> bazel build --config linux //...

Build on Macos arm64

> bazel build --config macos_arm64 //...

Build on Macos x64

> bazel build --config macos_x86_64 //...

NOTE:: MacOS v14.0.0 or later is recommended.

In certain versions of MacOS (prior to v13.5.1), a bug related to incorrect Bigint divide operations has been detected in the field generator when using the optimized build (-c opt).

The issue will be fixed as soon as possible.

Test

Test on Linux

> bazel test --config linux //...

Test on Macos arm64

> bazel test --config macos_arm64 //...

Test on Macos x64

> bazel test --config macos_x86_64 //...

Configuration

Polygon zkEVM backend prime field

NOTE:: Only x86_64 is supported.

  • --//:polygon_zkevm_backend: Enable goldilocks and zkevm-prover prime field backend.

    > bazel build --config ${os} --config avx512_${os} --//:polygon_zkevm_backend //...

Hardware acceleration

CUDA backend

  • --config cuda: Enable cuda backend.

    > bazel build --config ${os} --config cuda //...

ROCm backend

  • --config rocm: Enable rocm backend.

    > bazel build --config ${os} --config rocm //...

Matplotlib

Pyenv

If you are using pyenv, don't forget to add an option --enable-shared.

> CONFIGURE_OPTS=--enable-shared pyenv install <version>

Python dependencies

> pip install matplotlib

Frequently Asked Questions

Debugging on macOS

Please add this line to your .bazelrc.user.

build --spawn_strategy=local

Build on Ubuntu 20.04

Please update g++ version and try build again! The default g++-9 is not working.

> sudo apt install g++-10
> export CC=/usr/bin/gcc-10
> export CXX=/usr/bin/g++-10
> export GCC_HOST_COMPILER_PATH=/usr/bin/gcc-10

Build CUDA with rust toolchain

Use --sandbox_debug to see verbose messages from the sandbox and retain the sandbox build root for debugging
error: linking with `external/local_config_cuda/crosstool/clang/bin/crosstool_wrapper_driver_is_not_gcc` failed: exit status: 127
...
  = note: /usr/bin/env: 'python': No such file or directory

Please make your python point to python interpreter to be run.

> sudo apt install python-is-python3

Plus, please include these lines to your .bazelc.user.

build --action_env=PATH=/usr/bin:/usr/local/bin
build --host_action_env=PATH=/usr/bin:/usr/local/bin

tachyon's People

Contributors

chokobole avatar tomtaehoonkim avatar dongchangyoo avatar lightscale-luke avatar leegwangwoon avatar eltociear 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.