{"id":20464485,"url":"https://github.com/bytedance/matxscript","last_synced_at":"2025-04-13T00:45:30.101Z","repository":{"id":62877783,"uuid":"559960035","full_name":"bytedance/matxscript","owner":"bytedance","description":"A high-performance, extensible Python AOT compiler.","archived":false,"fork":false,"pushed_at":"2023-09-26T09:16:29.000Z","size":13870,"stargazers_count":422,"open_issues_count":31,"forks_count":39,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-13T00:45:22.518Z","etag":null,"topics":["compiler","machine-learning","python"],"latest_commit_sha":null,"homepage":"https://bytedance.github.io/matxscript/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bytedance.png","metadata":{"files":{"readme":"README.md","changelog":"NEWS.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-31T13:09:18.000Z","updated_at":"2025-04-08T02:45:01.000Z","dependencies_parsed_at":"2024-11-22T16:15:43.793Z","dependency_job_id":null,"html_url":"https://github.com/bytedance/matxscript","commit_stats":{"total_commits":147,"total_committers":12,"mean_commits":12.25,"dds":0.4217687074829932,"last_synced_commit":"a65a5a6d3043ac729d4f54a85fecd7226c8e8de3"},"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytedance%2Fmatxscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytedance%2Fmatxscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytedance%2Fmatxscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bytedance%2Fmatxscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bytedance","download_url":"https://codeload.github.com/bytedance/matxscript/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650420,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["compiler","machine-learning","python"],"created_at":"2024-11-15T13:15:22.782Z","updated_at":"2025-04-13T00:45:30.068Z","avatar_url":"https://github.com/bytedance.png","language":"C++","readme":"MatxScript\n===============================================================\n\n[Documentation](https://bytedance.github.io/matxscript/) |\n[文档](https://bytedance.github.io/matxscript/zh-CN/index.html) |\n[Contributors](CONTRIBUTORS.md) |\n[Release Notes](NEWS.md)\n\n\nMatxScript is an ahead of time compiler for a subset of the Python language.\n\nInstallation\n-------\n```bash\npip install matxscript\n```\n\n\nA Quick Example\n-------\n```python\nimport matx\nimport timeit\n\ndef fib(n: int) -\u003e int:\n    if n \u003c= 1:\n        return n\n    else:\n        return fib(n - 1) + fib(n - 2)\n\n\nif __name__ == '__main__':\n    fib_script = matx.script(fib)\n    \n    # test on Macbook with m1 chip\n    print(f'Python execution time: {timeit.timeit(lambda: fib(30), number=10)}s')  # 1.59s\n    print(f'Matx execution time: {timeit.timeit(lambda: fib_script(30), number=10)}s') # 0.03s\n```\n\n\nLicense\n-------\n© Bytedance Inc. Licensed under an [Apache-2.0](LICENSE) license.\n\nContribute to MatxScript\n------------------------\nEveryone is welcomed to contribute. We value all forms of contributions, including, but not limited to:\n\n   - Code reviewing of the existing patches.\n   - Documentation and usage examples\n   - Community participation in issues.\n   - Code readability and developer guide\n      - We welcome contributions that add code comments to improve readability\n      - We also welcome contributions to docs to explain the design choices of the internal.\n   - Test cases to make the codebase more robust\n   - Tutorials, blog posts, talks that promote the project.\n\nAcknowledgement\n---------------\nWe learned a lot from the following projects when building MatxScript.\n- [TVM](https://github.com/apache/tvm): Part of MatxScript's IR and Runtime\n  originates from TVM. We also learned and adapted some part of codegen pipeline from TVM.\n\n- [Python](https://github.com/python/cpython/tree/3.8): Part of the runtime code comes from cpython for align the semantics\n\n- [Folly](https://github.com/facebook/folly): We adopted the idea of FBString to design our runtime::string_core\n\n- [abseil-cpp](https://github.com/abseil/abseil-cpp): The string_view structure and ByteHash algorithm originates from abseil\n\n- [rapidjson](https://github.com/Tencent/rapidjson): The json module is implemented based on rapidjson\n\n- [CV-CUDA](https://github.com/CVCUDA/CV-CUDA): The vision CUDA runtime is developed using the operators provided by CV-CUDA. \n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytedance%2Fmatxscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbytedance%2Fmatxscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbytedance%2Fmatxscript/lists"}