All Projects → ManticoreProject → Manticore

ManticoreProject / Manticore

Licence: mit
Parallel ML compiler

Projects that are alternatives of or similar to Manticore

Ilgpu
ILGPU JIT Compiler for high-performance .Net GPU programs
Stars: ✭ 374 (+619.23%)
Mutual labels:  compiler, parallel
Pipelines
An experimental programming language for data flow
Stars: ✭ 354 (+580.77%)
Mutual labels:  compiler, parallel
Hybridizer Basic Samples
Examples of C# code compiled to GPU by hybridizer
Stars: ✭ 186 (+257.69%)
Mutual labels:  compiler, parallel
Numba
NumPy aware dynamic Python compiler using LLVM
Stars: ✭ 7,090 (+13534.62%)
Mutual labels:  compiler, parallel
Trck
Query engine for TrailDB
Stars: ✭ 48 (-7.69%)
Mutual labels:  compiler
Shaderc
A collection of tools, libraries, and tests for Vulkan shader compilation.
Stars: ✭ 1,016 (+1853.85%)
Mutual labels:  compiler
Antlr4 Calculator
Simple antlr4 calculator.
Stars: ✭ 40 (-23.08%)
Mutual labels:  compiler
Sorry Cypress
An open-source, on-premise, self-hosted alternative to Cypress Dashboard
Stars: ✭ 1,005 (+1832.69%)
Mutual labels:  parallel
8cc.go
C compiler written in Go
Stars: ✭ 52 (+0%)
Mutual labels:  compiler
Arithmetic Circuits
Arithmetic circuits for zero knowledge proof systems
Stars: ✭ 52 (+0%)
Mutual labels:  compiler
Patchouli Compiler
An Oberon-07 compiler for Intel 64 (AMD64) architecture
Stars: ✭ 46 (-11.54%)
Mutual labels:  compiler
Jsx Lite
Write components once, run everywhere. Compiles to Vue, React, Solid, Angular, Svelte, and Liquid.
Stars: ✭ 1,015 (+1851.92%)
Mutual labels:  compiler
Cymbal
Yet another Rust implementation of the Monkey language from "Writing an Interpreter in Go" and "Writing a Compiler in Go"
Stars: ✭ 49 (-5.77%)
Mutual labels:  compiler
Bytenode
A minimalist bytecode compiler for Node.js
Stars: ✭ 1,012 (+1846.15%)
Mutual labels:  compiler
B2dpipe
2D Pipeline Compiler.
Stars: ✭ 51 (-1.92%)
Mutual labels:  compiler
Mlml
self-hosted compiler for a subset of OCaml
Stars: ✭ 41 (-21.15%)
Mutual labels:  compiler
Leekscript V2
A dynamically typed, compiled just-in-time programming language used in Leek Wars' AIs
Stars: ✭ 46 (-11.54%)
Mutual labels:  compiler
Typhon
A virtual machine for Monte.
Stars: ✭ 49 (-5.77%)
Mutual labels:  compiler
U6a
Implementation of Unlambda, an esoteric programming language.
Stars: ✭ 46 (-11.54%)
Mutual labels:  compiler
Xyzpy
Efficiently generate and analyse high dimensional data.
Stars: ✭ 45 (-13.46%)
Mutual labels:  parallel

Manticore

pipeline status

Manticore is a high-level parallel programming language aimed at general-purpose applications running on multi-core processors. Manticore supports parallelism at multiple levels: explicit concurrency and coarse-grain parallelism via CML-style constructs and fine-grain parallelism via various light-weight notations, such as parallel tuple expressions and NESL/Nepal-style parallel array comprehensions.

REQUIREMENTS

Manticore currently only supports the x86-64 (a.k.a. AMD64) architecture running on either Linux or macOS. It is possible to build the compiler on other systems, but we have not ported the runtime system to them yet.

Manticore is implemented in a mix of C and SML code. You will need a recent version of SML/NJ (version 110.81+) installed. Furthermore, your installation of SML/NJ should include the MLRISC library. Note that SML/NJ 110.82's version of MLRISC is currently incompatible with our build system.

If you would like to have the LLVM backend available for use, follow the instructions below. Otherwise, skip to "Building from Source".

Optional Prerequisite: LLVM

You must have a custom version of LLVM built prior to configuring and building Manticore in order to have the LLVM backend available for use. The following commands will obtain the right LLVM sources and place it in ./llvm/src

git submodule init llvm/src
git submodule update llvm/src

Next, we're going to build LLVM, which has its own set of prerequisites that any Unix machine setup for C++ development should already have. To configure LLVM, run the following commands

cd llvm
mkdir build
cd build
cmake -G "Unix Makefiles" -DLLVM_TARGETS_TO_BUILD="X86" -DCMAKE_BUILD_TYPE=Release ../src

Next, we will build only the parts of LLVM that we need, which will take a few minutes. Replace n below with the number of parallel jobs you would like to use during the build, such as the number of cores on your system. To get the build going, run the following

make llc opt -j n

then, move back to the root directory with

cd ../..

and continue with configuring and building Manticore below. Note that LLVM will now be available under ./llvm/build and you should not need to rebuild it again.

Building From Source

If building and installing the system from source, you first must generate the configuration script. To do so, run the following two commands:

autoheader -Iconfig
autoconf -Iconfig

Then proceed with configuration.

Configuring

Our next step is to run the configure script. If you are using the MLRISC library included with your SML/NJ installation and do not plan to use the LLVM backend, you can simply run

./configure

and then skip to the build/installation step. Otherwise, you can add some of the following options to configure before moving on to building.

Configuring with external MLRISC

If you would like to configure with external MLRISC libraries, add the --with-mlrisc option.

./configure --with-mlrisc=<path to mlrisc>

Configuring with LLVM

If you want to have the LLVM backend available, configure with the local installation of LLVM after building it (using the instructions above) by adding the --with-llvm option to configure.

./configure --with-llvm=./llvm/build

Building and Installing the Distribution

Next, to build the compiler, we use the following command.

make build

We can install locally

make local-install

or globally.

make install

If you chose to do a local install, you'll find the compiler, pmlc, under the bin directory. Run pmlc -h for usage information.

Testing

Details about running the regression suite with various backends goes here.

Benchmarks

git submodule init src/benchmarks
git submodule update src/benchmarks

Then, see the README file under src/benchmarks for more details.


Known Issues

Some of the items below are out of date.

Larger Issues

  • The frontend does not support signatures, functors, record types, and a slew of corner cases in the language.

  • PVal and PTuples cannot be used together. The "fast clone" translation breaks invariants relied on by the work-stealing scheduler with regards to the valid intermediate states of the work queues.

  • Exception handling is not implemented.

  • The inatomic/from-atomic/to-atomic naming convention used in inline BOM is still a bugfest and should really be replaced by a static annotation that is checked by the compiler.

  • The basis library is a hodgepodge mess. The few structures that exist are typically dramatically different from the SML basis library due to the subset of the language implemented, which both makes existing code from another system hard to reuse and sometimes the interface cannot even be written.

Smaller Issues

  • The effect analysis defined in bom-opt/remove-atomics.sml should be changed from being name-based to instead either have a trackable annotation or other better marker for user-level code that uses mutable state. Additionally, while we remove ATOMIC operations around PURE functions, we do not handle reducing them in the case where the code between the parallel spawn and another lock is PURE.

  • We cannot handle allocations larger than a single heap page size (minus some slop). These allocations result in an exception, which is tough to debug because there is no exception handling.

  • The work-stealing scheduler cannot handle more than a stack of 32k tasks, and crashes quietly when that is exceeded.

  • Memoization and mutable state exist only as hand-performed translations to call basis library functions.

Incomplete projects

  • The safe-for-space closure conversion was not completed. While its code may be used for inspiration, we were not able to get a full write-up on its status before the student graduated.

  • In CFG, we now have code that performs rudimentary loop identification and can also generate a DOT file for visualization of basic blocks. Loop unrolling was not implemented.

  • A branch was created for the BOM implementation of flattening, but it is still in the design phase.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].