{"id":19296204,"url":"https://github.com/knight-x/rlens","last_synced_at":"2025-04-22T08:31:01.503Z","repository":{"id":149847461,"uuid":"122422530","full_name":"Knight-X/rLens","owner":"Knight-X","description":null,"archived":false,"fork":false,"pushed_at":"2018-09-19T06:45:10.000Z","size":100,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-01T21:15:24.685Z","etag":null,"topics":["compiler-optimization-pass","llvm","machine-learning","register-allocation","reinforcement-learning"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/Knight-X.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":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-02-22T02:48:09.000Z","updated_at":"2024-04-15T00:05:48.000Z","dependencies_parsed_at":null,"dependency_job_id":"56912265-f7fc-4663-a262-94452e660acb","html_url":"https://github.com/Knight-X/rLens","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knight-X%2FrLens","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knight-X%2FrLens/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knight-X%2FrLens/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Knight-X%2FrLens/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Knight-X","download_url":"https://codeload.github.com/Knight-X/rLens/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250206096,"owners_count":21392182,"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-optimization-pass","llvm","machine-learning","register-allocation","reinforcement-learning"],"created_at":"2024-11-09T22:45:59.377Z","updated_at":"2025-04-22T08:31:01.498Z","avatar_url":"https://github.com/Knight-X.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"rlens: compiler optimization framework\n\n\nIntroduction\n\nrLens is an compiler optimization framework via reinforcement learning. The project could optimize register allocation for graph computing like problem in different environment, such as compiler, deep learning framework. \n\n\nRegister Allocation:\n  1. allocate virtual register to physical register\n  2. traditionally, it was np-complete problem with graph-color strategy\n\npurpose:\n  1. reduce data dependency\n  2. target-dependent allocation strategy\n\nusage:\n  1. cd llvm \u0026\u0026 git checkout rpc \u0026\u0026 build [LLVM BUILD](https://llvm.org/docs/GettingStarted.html#compiling-the-llvm-suite-source-code)  \n  2. llc -emit-llvm -S targetfile \n  3. mv targetfile program/\n  4. modify src field of rlcofnig to  targetfile name  \n  5. python train_pg.py CartPole-v0 -n 50000 -b 5000 -e 1 -rtg -dna --exp_name test_compiler_softmax_falut_test_norandom\n  python train_pg.py -h for more information\n\n\nResult:\n  ![alt text](./pics/my_loss.png \"Optional title\")\nreference:\n  https://github.com/berkeleydeeprlcourse/homework \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknight-x%2Frlens","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknight-x%2Frlens","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknight-x%2Frlens/lists"}