{"id":19001301,"url":"https://github.com/oneflow-inc/oneflow-mlu","last_synced_at":"2025-08-02T06:06:19.425Z","repository":{"id":143112688,"uuid":"611522426","full_name":"Oneflow-Inc/oneflow-mlu","owner":"Oneflow-Inc","description":null,"archived":false,"fork":false,"pushed_at":"2023-05-22T11:23:40.000Z","size":61167,"stargazers_count":7,"open_issues_count":5,"forks_count":1,"subscribers_count":31,"default_branch":"master","last_synced_at":"2025-04-22T17:49:29.859Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Oneflow-Inc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-09T01:50:24.000Z","updated_at":"2025-03-10T04:10:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"b7d63245-d1f1-46b4-adc1-9b0d8da33d91","html_url":"https://github.com/Oneflow-Inc/oneflow-mlu","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Oneflow-Inc/oneflow-mlu","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oneflow-Inc%2Foneflow-mlu","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oneflow-Inc%2Foneflow-mlu/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oneflow-Inc%2Foneflow-mlu/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oneflow-Inc%2Foneflow-mlu/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Oneflow-Inc","download_url":"https://codeload.github.com/Oneflow-Inc/oneflow-mlu/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Oneflow-Inc%2Foneflow-mlu/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268339646,"owners_count":24234556,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2024-11-08T18:10:41.214Z","updated_at":"2025-08-02T06:06:19.198Z","avatar_url":"https://github.com/Oneflow-Inc.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# oneflow-mlu\n\nOneFlow-MLU is an OneFlow extension that enables oneflow to run on the Cambricon MLU chips. Currently it only supports the MLU 370 series.\n\n## Installation\n\n### pip\n\nTODO\n\n### Building From Source\n\n#### Prerequisites\n\n- install cmake\n- install Cambricon MLU driver (https://sdk.cambricon.com/download?sdk_version=V1.11.0\u0026component_name=Driver )，CNToolKit，CNNL and CNCL (https://sdk.cambricon.com/download?sdk_version=V1.11.0\u0026component_name=Basis ).\n- build oneflow with cpu only from source and install it\n\n#### Get the OneFlow-MLU Source\n\n```shell\ngit clone https://github.com/Oneflow-Inc/oneflow-mlu\n```\n\n#### Building\n\nInside OneFlow-MLU source directory, then run the following command to build and install `oneflow_mlu`,\n\n```shell\npython3 setup.py install\n```\n\n## Run A Toy Program\n\n```python\n# python3\n\n\u003e\u003e\u003e import oneflow as flow\n\u003e\u003e\u003e import oneflow_mlu\n\u003e\u003e\u003e\n\u003e\u003e\u003e m = flow.nn.Linear(3, 4).to(\"mlu\")\n\u003e\u003e\u003e x = flow.randn(4, 3, device=\"mlu\")\n\u003e\u003e\u003e y = m(x)\n\u003e\u003e\u003e print(y)\ntensor([[ 0.4239, -0.4689, -0.1660,  0.0718],\n        [ 0.5413,  1.9006,  2.0763,  0.8693],\n        [ 0.4226, -0.0207,  0.1006,  0.2234],\n        [ 0.4054, -0.2816, -0.4405,  0.1099]], device='mlu:0', dtype=oneflow.float32, grad_fn=\u003cbroadcast_addBackward\u003e)\n```\n\n## Models\n- [ResNet50](https://github.com/Oneflow-Inc/oneflow-mlu-models#resnet50)\n- [GPT2](https://github.com/Oneflow-Inc/oneflow-mlu-models#libai_gpt2)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneflow-inc%2Foneflow-mlu","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foneflow-inc%2Foneflow-mlu","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foneflow-inc%2Foneflow-mlu/lists"}