{"id":18422024,"url":"https://github.com/spcl/absinthe","last_synced_at":"2026-04-03T03:42:17.732Z","repository":{"id":135157971,"uuid":"197359357","full_name":"spcl/absinthe","owner":"spcl","description":"Absinthe is an optimization framework to fuse and tile stencil codes in one shot","archived":false,"fork":false,"pushed_at":"2019-07-17T10:06:40.000Z","size":1229,"stargazers_count":14,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-22T19:45:59.370Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spcl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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":"2019-07-17T09:33:17.000Z","updated_at":"2020-07-16T14:43:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"9e30ee5c-790f-4ace-af73-18ff939c48db","html_url":"https://github.com/spcl/absinthe","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/spcl%2Fabsinthe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spcl%2Fabsinthe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spcl%2Fabsinthe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spcl%2Fabsinthe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spcl","download_url":"https://codeload.github.com/spcl/absinthe/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247670072,"owners_count":20976497,"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":[],"created_at":"2024-11-06T04:27:47.101Z","updated_at":"2026-04-03T03:42:17.697Z","avatar_url":"https://github.com/spcl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Absinthe\n\nAbsinthe is an optimization framework to tune stencil programs. It learns a performance model and selects optimal code transformations according to the model. \n\nThe paper \"Absinthe: Learning an Analytical Performance Model to Fuse and Tile Stencil Codes in One Shot\" (Tobias Gysi, Tobias Grosser, and Torsten Hoefler) provides further implementation details. The software was developed by SPCL (ETH Zurich).\n\nThis README gives an overview on how to learn the performance model and optimize the stencil programs.\n\n## Training\n\nThe scripts fitcache.py and fitddr.py generate the training stencils to learn the performance model parameters. Before running the scripts we adapt the core count to the target system.\n\n```\n# set the core count of the target system\nCORES = 4\n```\n\nTo train Absinthe, we next generate the training files.\n\n```\npython ./fitcache.py -g -f ./fitcache\npython ./fitddr.py -g -f ./fitddr\n```\n\nWe then change to the fitcache and fitddr folders to build and run the training files.\n\n```\ncd ./fitcache\nmake \n./run.sh \u003e output.txt\ncd ..\npython ./fitcache.py -p output.txt -f ./fitcache\n```\n\n```\ncd ./fitddr\nmake \n./run.sh \u003e output.txt\ncd ..\npython ./fitddr.py -p output.txt -f ./fitddr\n```\n\nTo learn the performance model parameters, we run the fitcache.R and fitddr.R scripts. We first set the core count\n\n```\n# set the core count\ncores \u003c- 4\n```\n\nand then run the scripts.\n\n```\nRscript ./fitcache.R\nRscript ./fitddr.R\n```\n\nAs a result, we get the performance model parameters.\n\n```\nfast memory / cache\n[1] \"body:  9.44349025644442e-08\"\n[1] \"peel:  9.95340542431222e-07\"\n```\n\n```\nslow memory / ddr\n[1] \"training\"\n[1] \"rw body:  -2.23277083932771e-07\"\n[1] \"st body:  5.70758516005299e-07\"\n[1] \"rw peel:  -1.24949326618662e-06\"\n[1] \"st peel:  5.253636118141e-06\"\n```\n\n## Optimization\n\nWe next set the machine parameters in the files fastwaves.py, advection.py, and diffusion.py which implement the example stencil sequences.\n\n```\n\"MACHINE\" : {\"CORES\" : 4, \"CAPACITY\" : 85*1024},\n\"MEMORY\" : {\"RW BODY\" : -2.23e-7, \"ST BODY\": 5.71e-7, \"RW PEEL\" : -1.25e-6, \"ST PEEL\" : 5.25e-6},\n\"CACHE\" : {\"BODY\" : 9.44e-8, \"PEEL\" : 9.95e-7},\n```\n\nOnce the parameters are set we can run the optimization to generate different optimization variants.\n\n```\npython .\\fastwaves.py -e -g -f .\\fastwaves\npython .\\advection.py -e -g -f .\\advection\npython .\\diffusion.py -e -g -f .\\diffusion\n```\n\nNote that the hand-tuned and the auto-tuned variants are hard coded in the scripts.\n\nTo generate the plots for the different implementation variants, we extract the results and run the R scripts.\n\n```\npython ./fastwaves.py -p output.txt -f ./fastwaves\npython ./advection.py -p output.txt -f ./advection\npython ./diffusion.py -p output.txt -f ./diffusion\n\nRscript ./fastwaves.r\nRscript ./advection.r\nRscript ./diffusion.r\n```\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspcl%2Fabsinthe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspcl%2Fabsinthe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspcl%2Fabsinthe/lists"}