{"id":49305470,"url":"https://github.com/beakthoven/mlgo-linux-kernel","last_synced_at":"2026-04-26T09:05:20.869Z","repository":{"id":214835459,"uuid":"683953869","full_name":"beakthoven/mlgo-linux-kernel","owner":"beakthoven","description":"Scripts to train MLGO models for Linux kernels","archived":false,"fork":false,"pushed_at":"2024-12-07T07:07:57.000Z","size":30,"stargazers_count":9,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-24T20:36:48.197Z","etag":null,"topics":["compiler-optimization","hacktoberfest","hacktoberfest-accepted","linux-kernel","llvm","machine-learning"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/beakthoven.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2023-08-28T06:20:47.000Z","updated_at":"2024-12-07T07:08:01.000Z","dependencies_parsed_at":null,"dependency_job_id":"f6e79343-1ead-4f02-b186-adb242d29839","html_url":"https://github.com/beakthoven/mlgo-linux-kernel","commit_stats":null,"previous_names":["dakkshesh07/mlgo-linux-kernel","beakthoven/mlgo-linux-kernel"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/beakthoven/mlgo-linux-kernel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beakthoven%2Fmlgo-linux-kernel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beakthoven%2Fmlgo-linux-kernel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beakthoven%2Fmlgo-linux-kernel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beakthoven%2Fmlgo-linux-kernel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/beakthoven","download_url":"https://codeload.github.com/beakthoven/mlgo-linux-kernel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/beakthoven%2Fmlgo-linux-kernel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32291347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T08:29:33.829Z","status":"ssl_error","status_checked_at":"2026-04-26T08:29:18.366Z","response_time":129,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["compiler-optimization","hacktoberfest","hacktoberfest-accepted","linux-kernel","llvm","machine-learning"],"created_at":"2026-04-26T09:04:39.064Z","updated_at":"2026-04-26T09:05:20.865Z","avatar_url":"https://github.com/beakthoven.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MLGO for Linux Kernels\n\n## Overview\nThis project leverages the [MLGO](https://github.com/google/ml-compiler-opt) (Machine Learning Guided Compiler Optimizations) infrastructure to train custom optimization models specifically tailored for compiling Linux kernel sources.\n\n## What is MLGO?\n[MLGO](https://github.com/google/ml-compiler-opt) is a framework developed by Google for integrating ML techniques systematically in [LLVM](https://github.com/llvm/llvm-project/). It replaces human-crafted optimization heuristics in LLVM with machine learned models.\n\n### The MLGO framework currently supports two optimizations:\n1. **Inlining-for-size ([LLVM RFC](https://lists.llvm.org/pipermail/llvm-dev/2020-April/140763.html))**\n2. **Register-allocation-for-performance ([LLVM RFC](https://lists.llvm.org/pipermail/llvm-dev/2021-November/153639.html))**\n\n## Training from Linux Kernel Sources\nYou can train your own model by using our scripts.\n\nexample:\n```sh\nbash train_model.sh --arch=arm64 --model=regalloc\n```\n\nTo know about all the supported arguments run the script with --help.\n\n## Pretrained Models\nWe provide pretrained regalloc models trained off of Linux kernel sources using our scripts. We provide our models in X86_64 and ARM64 flavours, the training compilation is done using the default defconfig for the respective archtitecture.\nModels are released as github releases, and are named as:\n[task]-linux-[linux kernel version used for training]-[arch]-[release candidate].\n\nWhen building LLVM, there is a flag `-DLLVM_RAEVICT_MODEL_PATH` which you may\nset to the path to your downloaded model.\n\n```sh\n# Model is in /tmp/model, i.e. there is a file /tmp/model/saved_model.pb along\n# with the rest of the tensorflow saved_model files produced from training.\n-DLLVM_RAEVICT_MODEL_PATH=/tmp/model\n```\n\n## Documentation\n- [MLGO Paper](https://arxiv.org/abs/2101.04808)\n- [MLGO Repo README](https://github.com/google/ml-compiler-opt/blob/main/README.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeakthoven%2Fmlgo-linux-kernel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbeakthoven%2Fmlgo-linux-kernel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbeakthoven%2Fmlgo-linux-kernel/lists"}