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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

File details

Details for the file cometpy-0.1.tar.gz.

File metadata

  • Download URL: cometpy-0.1.tar.gz
  • Upload date:
  • Size: 102.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for cometpy-0.1.tar.gz
Algorithm Hash digest
SHA256 83726128646eaf0075e6d06256ccfffedcf36309535c9a54f87818e1ec106b2d
MD5 c1c81c6ed03d0fa400ad9bf7578421bb
BLAKE2b-256 0d4b355c96b13812c20f5f1be7f54ac157edf3aafc82c3972f761da18a76ef7e

See more details on using hashes here.

File details

Details for the file cometpy-0.1-py3-none-any.whl.

File metadata

  • Download URL: cometpy-0.1-py3-none-any.whl
  • Upload date:
  • Size: 104.6 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.7

File hashes

Hashes for cometpy-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 24e1cb733a74b3f5cd6b15928754a1ad198f579a56b82866407b90e3087130e1
MD5 23fa9fc8fa6fb74c1a7afe1045eef2f2
BLAKE2b-256 c55d7aca43c0b44f8badab6971c85aaef3e79fd74654ac0cd014adad5a7eb1ef

See more details on using hashes here.

Supported by

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