Skip to main content

Comet Domain Specific Compiler as Python package

Project description

cometpy

Comet Domain Specific Compiler for NumPy frontends.

Latest Version : v0.1

Requirements:

  1. python 3 and above
  2. COMET Python package v0.1
  3. OS support - Linux and macOS

"COMET" / Domain specific COMpiler for Extreme Targets

The COMET compiler consists of a Domain Specific Language (DSL) for sparse and dense tensor algebra computations, a progressive lowering process to map high-level operations to low-level architectural resources, a series of optimizations performed in the lowering process, and various IR dialects to represent key concepts, operations, and types at each level of the multi-level IR. At each level of the IR stack, COMET performs different optimizations and code transformations. Domain-specific, hardware- agnostic optimizations that rely on high-level semantic information are applied at high-level IRs. These include reformulation of high-level operations in a form that is amenable for execution on heterogeneous devices (e.g., rewriting Tensor contraction operations as Transpose-Transpose-GEMM-Transpose) and automatic parallelization of high-level primitives (e.g., tiling for thread- and task-level parallelism).

More information about the COMET compiler can be found at:

  1. COMET's source code - https://github.com/pnnl/COMET
  2. COMET’s documentation - https://pnnl-comet.readthedocs.io/en/latest/

Installation and Testing:

  1. Getting COMET pyhton package:

    • Install the COMET python package using pip (or) pip3 python package managers as:
    • For macOS users: python3 -m pip install cometpy
    • For Linux users: python3 -m pip install cometpy-lnx
  2. Using COMET compiler as a backend to lower and execute test methods:

    • Import the Comet Python package in your python script using - "import cometpy as comet"

    • To compile a test method using COMET, add the decorator "@comet.compile(flags=...)" before the method.

    • The "numpy" keyword in a target method needs to be replace with "comet" e.g. "comet.einsum" , "comet.multiply"

    • Supported "numpy" methods:

      • .einsum()
      • .multiply()
    • For the actual "einsum" computation, follow the convention - "comet.einsum()"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cometpy-0.1.tar.gz (102.5 MB view hashes)

Uploaded Source

Built Distribution

cometpy-0.1-py3-none-any.whl (104.6 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page