{"id":19664855,"url":"https://github.com/fluxml/hydra.jl","last_synced_at":"2025-02-27T03:43:20.758Z","repository":{"id":71667241,"uuid":"165679680","full_name":"FluxML/Hydra.jl","owner":"FluxML","description":"SPMD + Neural Nets","archived":false,"fork":false,"pushed_at":"2020-02-08T15:28:39.000Z","size":70,"stargazers_count":32,"open_issues_count":14,"forks_count":3,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-02-23T02:03:01.849Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Julia","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FluxML.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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},"funding":{"github":["JuliaLang"]}},"created_at":"2019-01-14T14:54:48.000Z","updated_at":"2024-06-29T10:30:51.000Z","dependencies_parsed_at":"2023-02-23T18:30:35.518Z","dependency_job_id":null,"html_url":"https://github.com/FluxML/Hydra.jl","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/FluxML%2FHydra.jl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluxML%2FHydra.jl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluxML%2FHydra.jl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FluxML%2FHydra.jl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FluxML","download_url":"https://codeload.github.com/FluxML/Hydra.jl/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240974465,"owners_count":19887302,"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-11T16:19:17.848Z","updated_at":"2025-02-27T03:43:20.734Z","avatar_url":"https://github.com/FluxML.png","language":"Julia","funding_links":["https://github.com/sponsors/JuliaLang"],"categories":[],"sub_categories":[],"readme":"# Hydra\n\nHydra provides a SPMD programming model for Julia, intended for auto batching of\nmachine learning models. Hydra is an early proof-of-concept; it ready for simple\nalpha testing and testers should open issues liberally.\n\n```julia\njulia\u003e @spmd 4 println(\"Hello, World!\")\nHello, World!\nHello, World!\nHello, World!\nHello, World!\n```\n\n`@spmd N` is analagous to `for i = 1:N ...`, with an important difference;\neach \"lane\" (iteration) runs *in lockstep*, one instruction from each lane at\na time.\n\n```\njulia\u003e @spmd 4 begin\n         println(\"Hello from lane \", lane())\n         println(\"Goodbye from lane \", lane())\n       end\nHello from lane 1\nHello from lane 2\nHello from lane 3\nHello from lane 4\nGoodbye from lane 1\nGoodbye from lane 2\nGoodbye from lane 3\nGoodbye from lane 4\n```\n\nThis allows computations across lanes to be run *batched*. For example, the set\nof return values from `lane()` can be stored as a tuple and use [SIMD\noperations](https://github.com/eschnett/SIMD.jl); thus 4 lanes of SPMD code can\npotentially be just as fast as a single lane of normal scalar code. Hydra also\nhandles batches of more complex objects such as arrays, allowing it to express\nthe kinds of batching used in machine learning.\n\n```julia\njulia\u003e @spmd 4 lanesum(lane()*2)\n20\n```\n\nCrucially, Hydra does this while taking care of control flow, so we hope to\nbring great performance to almost any Julia program.\n\n```julia\njulia\u003e @spmd 4 begin\n         iseven(lane()) \u0026\u0026 println(\"Hello from lane \", lane())\n       end\nHello from lane 2\nHello from lane 4\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluxml%2Fhydra.jl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffluxml%2Fhydra.jl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffluxml%2Fhydra.jl/lists"}