GithubHelp home page GithubHelp logo

partir-redistribution-ocaml's Introduction

partir-redistribution-ocaml

This repository implements constructs from Memory-efficient array redistribution through portable collective communication, mainly to solve the memory-constrained redistribution problem (Section 4.3).

The most notable functions are listed in lib/redistribute.mli and summarized here:

(* Transform an array type via a sequence of collectives *)
val interpret :
  Mesh.t -> Collective.t list -> Array_type.t -> Array_type.t Or_error.t

(* Transform a sequence of collectives to normal form *)
val to_normal_form :
  Mesh.t -> Array_type.t -> Collective.t list -> Collective.t list Or_error.t

(* Generate a redistribution program between array types in normal form *)
val redistribute :
  Mesh.t -> Array_type.t -> Array_type.t -> Collective.t list Or_error.t

Installation

After installing dune, core, and ppx_jane via opam, run tests with dune runtest.

Visual Example

Given mesh of {"x": 2, "y": 3}, we can redistribute from [3{"x"}6] to [2{"y"}6] with the following collectives.

Let the full contents of the undistributed array be [0, ..., 5].

[3{"x"}6]
x↓ y→  0    1    2
 0   012  012  012
 1   345  345  345

-- dynslice(0, "y") -->

[1{"y", "x"}6]
x↓ y→  0    1    2
 0     0    1    2
 1     3    4    5

-- allpermute -->

[1{"x", "y"}6]
x↓ y→  0    1    2
 0     0    2    4
 1     1    3    5

-- allgather(0) -->

[2{"y"}6]
x↓ y→  0    1    2
 0    01   23   45
 1    01   23   45

partir-redistribution-ocaml's People

Contributors

rtjoa avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.