https://github.com/bytedance/matxscript

A high-performance, extensible Python AOT compiler.

https://github.com/bytedance/matxscript

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary

Keywords

compiler machine-learning python
Last synced: 5 months ago · JSON representation

Repository

A high-performance, extensible Python AOT compiler.

Basic Info
Statistics
  • Stars: 435
  • Watchers: 15
  • Forks: 42
  • Open Issues: 32
  • Releases: 2
Topics
compiler machine-learning python
Created over 3 years ago · Last pushed over 2 years ago
Metadata Files
Readme Changelog License

README.md

MatxScript

Documentation | 文档 | Contributors | Release Notes

MatxScript is an ahead of time compiler for a subset of the Python language.

Installation

bash pip install matxscript

A Quick Example

```python import matx import timeit

def fib(n: int) -> int: if n <= 1: return n else: return fib(n - 1) + fib(n - 2)

if name == 'main': fib_script = matx.script(fib)

# test on Macbook with m1 chip
print(f'Python execution time: {timeit.timeit(lambda: fib(30), number=10)}s')  # 1.59s
print(f'Matx execution time: {timeit.timeit(lambda: fib_script(30), number=10)}s') # 0.03s

```

License

© Bytedance Inc. Licensed under an Apache-2.0 license.

Contribute to MatxScript

Everyone is welcomed to contribute. We value all forms of contributions, including, but not limited to:

  • Code reviewing of the existing patches.
  • Documentation and usage examples
  • Community participation in issues.
  • Code readability and developer guide
    • We welcome contributions that add code comments to improve readability
    • We also welcome contributions to docs to explain the design choices of the internal.
  • Test cases to make the codebase more robust
  • Tutorials, blog posts, talks that promote the project.

Acknowledgement

We learned a lot from the following projects when building MatxScript. - TVM: Part of MatxScript's IR and Runtime originates from TVM. We also learned and adapted some part of codegen pipeline from TVM.

  • Python: Part of the runtime code comes from cpython for align the semantics

  • Folly: We adopted the idea of FBString to design our runtime::string_core

  • abseil-cpp: The string_view structure and ByteHash algorithm originates from abseil

  • rapidjson: The json module is implemented based on rapidjson

  • CV-CUDA: The vision CUDA runtime is developed using the operators provided by CV-CUDA.

Owner

  • Name: Bytedance Inc.
  • Login: bytedance
  • Kind: organization
  • Location: Singapore

GitHub Events

Total
  • Issues event: 3
  • Watch event: 30
  • Pull request event: 1
  • Fork event: 7
Last Year
  • Issues event: 3
  • Watch event: 30
  • Pull request event: 1
  • Fork event: 7

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 207
  • Total Committers: 12
  • Avg Commits per committer: 17.25
  • Development Distribution Score (DDS): 0.483
Past Year
  • Commits: 0
  • Committers: 0
  • Avg Commits per committer: 0.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
maxiandi m****g@1****m 107
jiachengyang 1****e 63
Chi Zhang z****2@b****m 15
lly-devbd 1****d 5
Xian Wu w****4@b****m 4
cloud-yys 7****2 3
baihan shu b****u@g****m 2
Haibin Lin l****c@g****m 2
Chengquan Jiang j****n@b****m 2
maxiandi m****i@b****m 2
侯奇 h****3@g****m 1
jundaf 4****2 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 20
  • Total pull requests: 106
  • Average time to close issues: 4 months
  • Average time to close pull requests: 2 days
  • Total issue authors: 14
  • Total pull request authors: 8
  • Average comments per issue: 0.8
  • Average comments per pull request: 0.1
  • Merged pull requests: 97
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 3
  • Pull requests: 1
  • Average time to close issues: N/A
  • Average time to close pull requests: N/A
  • Issue authors: 3
  • Pull request authors: 1
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 0
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • cloud-mxd (4)
  • lucasjinreal (3)
  • jc-bytedance (2)
  • kongroo (1)
  • koyo922 (1)
  • hyfeng (1)
  • eric-haibin-lin (1)
  • lilothar (1)
  • GeorgeSen (1)
  • sink-shen (1)
  • River-Shi (1)
  • gKevinK (1)
  • xvbolai (1)
  • FireBrother (1)
Pull Request Authors
  • cloud-mxd (47)
  • jc-bytedance (45)
  • lly-devbd (5)
  • vermouth1992 (4)
  • kongroo (2)
  • houqi (1)
  • whitelok (1)
  • jundaf2 (1)
Top Labels
Issue Labels
enhancement (4) good first issue (2) bug (1) documentation (1)
Pull Request Labels
enhancement (4)

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 28 last-month
  • Total dependent packages: 0
  • Total dependent repositories: 0
  • Total versions: 3
  • Total maintainers: 3
pypi.org: matxscript

Static Python AOT Compiler

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 28 Last month
Rankings
Stargazers count: 3.9%
Dependent packages count: 6.6%
Forks count: 9.1%
Average: 14.4%
Downloads: 21.6%
Dependent repos count: 30.6%
Maintainers (3)
Last synced: 6 months ago

Dependencies

python/requirements.txt pypi
  • astpretty >=1.0,<3.0.0
  • numpy >=1.6,<2.0.0
  • prettytable >=1.0,<4.0.0
  • typed_ast *
.github/workflows/analysis_include_h.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/build_lib.yml actions
  • actions/checkout v3 composite
.github/workflows/build_pip_whl.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/check_cc_codestyle.yml actions
  • actions/checkout v3 composite
.github/workflows/check_py_codestyle.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/static.yml actions
  • actions/checkout v3 composite
  • actions/configure-pages v2 composite
  • actions/deploy-pages v1 composite
  • actions/setup-python v4 composite
  • actions/upload-pages-artifact v1 composite
.github/workflows/test_cc_runtime_unit.yml actions
  • actions/checkout v3 composite
.github/workflows/test_py_ir.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_py_kernel.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_py_runtime37.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_py_runtime38.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_py_runtime39.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_py_script37.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_py_script38.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_py_script39.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_py_trace37.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_py_trace38.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_py_trace39.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_tensorflow2_integration.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/test_torch_integration.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
python/setup.py pypi