{"id":20545964,"url":"https://github.com/rtjoa/partir-redistribution-ocaml","last_synced_at":"2026-04-19T12:33:04.293Z","repository":{"id":208161339,"uuid":"716887084","full_name":"rtjoa/partir-redistribution-ocaml","owner":"rtjoa","description":"Distributed array redistribution in OCaml, based on https://arxiv.org/pdf/2112.01075.pdf","archived":false,"fork":false,"pushed_at":"2023-11-20T05:38:53.000Z","size":21,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T16:19:49.996Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"OCaml","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/rtjoa.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":"2023-11-10T04:38:40.000Z","updated_at":"2023-11-20T05:31:42.000Z","dependencies_parsed_at":"2023-11-20T04:30:29.664Z","dependency_job_id":"5e30974a-e23f-4fae-b5b9-0f20c1911f8f","html_url":"https://github.com/rtjoa/partir-redistribution-ocaml","commit_stats":null,"previous_names":["rtjoa/partir-redistribution-ocaml"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtjoa%2Fpartir-redistribution-ocaml","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtjoa%2Fpartir-redistribution-ocaml/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtjoa%2Fpartir-redistribution-ocaml/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rtjoa%2Fpartir-redistribution-ocaml/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rtjoa","download_url":"https://codeload.github.com/rtjoa/partir-redistribution-ocaml/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242150808,"owners_count":20080006,"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-16T01:54:59.947Z","updated_at":"2025-12-04T13:09:21.705Z","avatar_url":"https://github.com/rtjoa.png","language":"OCaml","funding_links":[],"categories":[],"sub_categories":[],"readme":"# partir-redistribution-ocaml\n\nThis repository implements constructs from *[Memory-efficient array redistribution\nthrough portable collective communication](https://arxiv.org/abs/2112.01075)*,\nmainly to solve the **memory-constrained redistribution problem** (Section 4.3).\n\nThe most notable functions are listed in\n[`lib/redistribute.mli`](lib/redistribute.mli) and summarized here:\n\n```ocaml\n(* Transform an array type via a sequence of collectives *)\nval interpret :\n  Mesh.t -\u003e Collective.t list -\u003e Array_type.t -\u003e Array_type.t Or_error.t\n\n(* Transform a sequence of collectives to normal form *)\nval to_normal_form :\n  Mesh.t -\u003e Array_type.t -\u003e Collective.t list -\u003e Collective.t list Or_error.t\n\n(* Generate a redistribution program between array types in normal form *)\nval redistribute :\n  Mesh.t -\u003e Array_type.t -\u003e Array_type.t -\u003e Collective.t list Or_error.t\n```\n\n## Installation\n\nAfter installing `dune`, `core`, and `ppx_jane` via opam, run tests with `dune runtest`.\n\n## Visual Example\nGiven mesh of `{\"x\": 2, \"y\": 3}`, we can redistribute from `[3{\"x\"}6]` to\n`[2{\"y\"}6]` with the following collectives.\n\nLet the full contents of the undistributed array be `[0, ..., 5]`.\n\n```\n[3{\"x\"}6]\nx↓ y→  0    1    2\n 0   012  012  012\n 1   345  345  345\n\n-- dynslice(0, \"y\") --\u003e\n\n[1{\"y\", \"x\"}6]\nx↓ y→  0    1    2\n 0     0    1    2\n 1     3    4    5\n\n-- allpermute --\u003e\n\n[1{\"x\", \"y\"}6]\nx↓ y→  0    1    2\n 0     0    2    4\n 1     1    3    5\n\n-- allgather(0) --\u003e\n\n[2{\"y\"}6]\nx↓ y→  0    1    2\n 0    01   23   45\n 1    01   23   45\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtjoa%2Fpartir-redistribution-ocaml","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frtjoa%2Fpartir-redistribution-ocaml","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frtjoa%2Fpartir-redistribution-ocaml/lists"}