{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/neurovectorizer-end-to-end-vectorization-with","title":"NeuroVectorizer: End-to-End Vectorization with Deep Reinforcement Learning","arxiv_id":"1909.13639","date":"2019-09-20","proceeding":null,"authors":["Ameer Haj-Ali","Nesreen K. Ahmed","Ted Willke","Sophia Shao","Krste Asanovic","Ion Stoica"],"abstract":"One of the key challenges arising when compilers vectorize loops for today's SIMD-compatible architectures is to decide if vectorization or interleaving is beneficial. Then, the compiler has to determine how many instructions to pack together and how many loop iterations to interleave. Compilers are designed today to use fixed-cost models that are based on heuristics to make vectorization decisions on loops. However, these models are unable to capture the data dependency, the computation graph, or the organization of instructions. Alternatively, software engineers often hand-write the vectorization factors of every loop. This, however, places a huge burden on them, since it requires prior experience and significantly increases the development time. In this work, we explore a novel approach for handling loop vectorization and propose an end-to-end solution using deep reinforcement learning (RL). We conjecture that deep RL can capture different instructions, dependencies, and data structures to enable learning a sophisticated model that can better predict the actual performance cost and determine the optimal vectorization factors. We develop an end-to-end framework, from code to vectorization, that integrates deep RL in the LLVM compiler. Our proposed framework takes benchmark codes as input and extracts the loop codes. These loop codes are then fed to a loop embedding generator that learns an embedding for these loops. Finally, the learned embeddings are used as input to a Deep RL agent, which determines the vectorization factors for all the loops. We further extend our framework to support multiple supervised learning methods. We evaluate our approaches against the currently used LLVM vectorizer and loop polyhedral optimization techniques. Our experiments show 1.29X-4.73X performance speedup compared to baseline and only 3% worse than the brute-force search on a wide range of benchmarks.","url_abs":"https://arxiv.org/abs/1909.13639v4","url_pdf":"https://arxiv.org/pdf/1909.13639v4.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"links_only","authors_date_abstract":"arXiv metadata, CC0 1.0 (https://info.arxiv.org/help/license), from the Kaggle arXiv metadata snapshot of 2026-09-12"},"code_links":[{"paper_slug":"neurovectorizer-end-to-end-vectorization-with","repo_url":"https://github.com/Intel-Academic/NeuroVectorizer","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"tf","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/1909.13639","atlas_url":"https://app.syntology.ai/?focus=1909.13639","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"1909.13639"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Intel-Academic/NeuroVectorizer","reach":{"status":"ok","spdx":"BSD-3-Clause"}}],"summary":{"unverified":4},"by_repo_kind":{"official":{"samples":4,"ran":0,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":4,"samples":[{"code_sha256_prefix":"3d9a024b36820655","entry":"generate_cmd","repo":"Intel-Academic/NeuroVectorizer","repo_kind":"official","path":"extractor_c.py","file_url":"https://github.com/Intel-Academic/NeuroVectorizer/blob/HEAD/extractor_c.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":false,"mcp_get_code":{"code_sha256":"3d9a024b36820655"}},{"code_sha256_prefix":"49d9fada78ba98ca","entry":"get_O3_runtimes","repo":"Intel-Academic/NeuroVectorizer","repo_kind":"official","path":"utility.py","file_url":"https://github.com/Intel-Academic/NeuroVectorizer/blob/HEAD/utility.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":false,"mcp_get_code":{"code_sha256":"49d9fada78ba98ca"}},{"code_sha256_prefix":"d7cebd39107b8a29","entry":"init_runtimes_dict","repo":"Intel-Academic/NeuroVectorizer","repo_kind":"official","path":"utility.py","file_url":"https://github.com/Intel-Academic/NeuroVectorizer/blob/HEAD/utility.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":false,"mcp_get_code":{"code_sha256":"d7cebd39107b8a29"}},{"code_sha256_prefix":"4ddc2ab47edf4b15","entry":"rename_contents","repo":"Intel-Academic/NeuroVectorizer","repo_kind":"official","path":"utility.py","file_url":"https://github.com/Intel-Academic/NeuroVectorizer/blob/HEAD/utility.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"BSD-3-Clause","inline_ok":false,"mcp_get_code":{"code_sha256":"4ddc2ab47edf4b15"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}