{"id":21995560,"url":"https://github.com/chriscummins/clgen","last_synced_at":"2025-04-30T17:27:15.608Z","repository":{"id":55648777,"uuid":"67887646","full_name":"ChrisCummins/clgen","owner":"ChrisCummins","description":"Deep learning program generator","archived":false,"fork":false,"pushed_at":"2023-12-04T22:16:58.000Z","size":9172,"stargazers_count":106,"open_issues_count":17,"forks_count":30,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-03-30T18:22:22.577Z","etag":null,"topics":["benchmarking","big-data","deep-learning","gpu","lstm","machine-learning","neural-network","opencl","synthetic-programs"],"latest_commit_sha":null,"homepage":"https://chriscummins.cc/pub/2017-cgo.pdf","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ChrisCummins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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}},"created_at":"2016-09-10T18:29:20.000Z","updated_at":"2025-03-15T19:26:54.000Z","dependencies_parsed_at":"2024-01-16T00:22:16.194Z","dependency_job_id":"ffe3eae9-ea8e-43e1-b8fe-966cc72939bd","html_url":"https://github.com/ChrisCummins/clgen","commit_stats":null,"previous_names":[],"tags_count":76,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisCummins%2Fclgen","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisCummins%2Fclgen/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisCummins%2Fclgen/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ChrisCummins%2Fclgen/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ChrisCummins","download_url":"https://codeload.github.com/ChrisCummins/clgen/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251750499,"owners_count":21637733,"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":["benchmarking","big-data","deep-learning","gpu","lstm","machine-learning","neural-network","opencl","synthetic-programs"],"created_at":"2024-11-29T21:16:49.584Z","updated_at":"2025-04-30T17:27:15.563Z","avatar_url":"https://github.com/ChrisCummins.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ca href=\"https://github.com/ChrisCummins/phd/tree/master/deeplearning/clgen\"\u003e\n    \u003cimg src=\"https://raw.githubusercontent.com/ChrisCummins/phd/master/deeplearning/clgen/docs/assets/logo.png\" width=\"420\"\u003e\n  \u003c/a\u003e\n\u003c/div\u003e\n\n-------\n\n\u003cdiv align=\"center\"\u003e\n  \u003c!-- Better code --\u003e\n  \u003ca href=\"https://bettercodehub.com/results/ChrisCummins/clgen\"\u003e\n    \u003cimg src=\"https://bettercodehub.com/edge/badge/ChrisCummins/clgen?branch=master\"\u003e\n  \u003c/a\u003e\n  \u003c!-- License --\u003e\n  \u003ca href=\"https://www.gnu.org/licenses/gpl-3.0.en.html\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/license-GNU%20GPL%20v3-blue.svg?style=flat\"\u003e\n  \u003c/a\u003e\n  \u003cbr\u003e\n  Maintainer: \u003ca href=\"https://github.com/fivosts\"\u003efivosts\u003c/a\u003e. See \u003ca href=\"https://github.com/fivosts/BenchPress\"\u003eBenchPress\u003c/a\u003e for a more recent version. BenchPress also supports CLgen models.\n\u003c/div\u003e\n\n**CLgen** is an open source application for generating runnable programs using\ndeep learning. CLgen *learns* to program using neural networks which model the\nsemantics and usage from large volumes of program fragments, generating\nmany-core OpenCL programs that are representative of, but *distinct* from, the\nprograms it learns from.\n\n\u003cimg src=\"https://raw.githubusercontent.com/ChrisCummins/phd/master/deeplearning/clgen/docs/assets/pipeline.png\" width=\"500\"\u003e\n\n\n## Getting Started\n\nFirst check out [INSTALL.md](/INSTALL.md) for instructions on getting the build\nenvironment set up .\n\nThen build CLgen using:\n\n```sh\n$ bazel build -c opt //deeplearning/clgen\n```\n\nUse our tiny example dataset to train and sample your first CLgen model:\n\n```sh\n$ bazel-bin/deeplearning/clgen -- \\\n    --config $PWD/deeplearning/clgen/tests/data/tiny/config.pbtxt\n```\n\n\u003cimg src=\"https://raw.githubusercontent.com/ChrisCummins/phd/master/deeplearning/clgen/docs/assets/clgen.gif\" width=\"500\"\u003e\n\n\n#### What next?\n\nCLgen is a tool for generating source code. How you use it will depend entirely\non what you want to do with the generated code. As a first port of call I'd\nrecommend checking out how CLgen is configured. CLgen is configured through a\nhandful of\n[protocol buffers](https://developers.google.com/protocol-buffers/) defined in\n[//deeplearning/clgen/proto](/deeplearning/clgen/proto).\nThe [clgen.Instance](/deeplearning/clgen/proto/clgen.proto) message type\ncombines a [clgen.Model](/deeplearning/clgen/proto/model.proto) and\n[clgen.Sampler](/deeplearning/clgen/proto/sampler.proto) which define the\nway in which models are trained, and how new programs are generated,\nrespectively. You will probably want to assemble a large corpus of source code\nto train a new model on - I have [tools](/datasets/github/scrape_repos) which\nmay help with that. You may also want a means to execute arbitrary generated\ncode - as it happens I have [tools](/gpu/cldrive) for that too. :-) Thought of a\nnew use case? I'd love to hear about it!\n\n\n## Resources\n\nPresentation slides:\n\n\u003ca href=\"https://speakerdeck.com/chriscummins/synthesizing-benchmarks-for-predictive-modelling-cgo-17\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/ChrisCummins/phd/master/deeplearning/clgen/docs/assets/slides.png\" width=\"500\"\u003e\n\u003c/a\u003e\n\nPublication\n[\"Synthesizing Benchmarks for Predictive Modeling\"](https://github.com/ChrisCummins/paper-synthesizing-benchmarks)\n(CGO'17).\n\n[Jupyter notebook](https://github.com/ChrisCummins/paper-synthesizing-benchmarks/blob/master/code/Paper.ipynb)\ncontaining experimental evaluation of an early version of CLgen.\n\nMy documentation sucks. Don't be afraid to get stuck in and start\n[reading the code!](deeplearning/clgen/clgen.py)\n\n## License\n\nCopyright 2016-2020 Chris Cummins \u003cchrisc.101@gmail.com\u003e.\n\nReleased under the terms of the GPLv3 license. See\n[LICENSE](/deeplearning/clgen/LICENSE) for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriscummins%2Fclgen","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchriscummins%2Fclgen","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchriscummins%2Fclgen/lists"}