Skip to main content

No project description provided

Project description

Tadashi

Tadashi is a Python library for program optimization and transformation using the ISL and PET libraries. It provides an interface to work with SCoPs (Static Control Parts) and enables program transformations like tiling, interchange, fusion, and more.

Installation

Install via pip:

pip install tadashi

Or for development:

pip install -e .

Development Setup

For development, use the provided setup:

# Build in-place for development
python setup.py build_ext -i

# Run all tests
python -m unittest discover tests

# Or run a specific test
python -m unittest tests.test_apps.TestSimple.test_end2end_polly_flang

Usage

Using PET Backend (Default)

from tadashi import TrEnum
from tadashi.translators import Pet

# Create a translator for C code using PET backend
translator = Pet()
translator.set_source('./examples/inputs/hello.c', [])

# Get the schedule tree
schedule_tree = translator.scops[0].schedule_tree

# Perform transformations
for node in schedule_tree:
    if node.node_type == 'BAND':
        # Apply transformations
        node.transform(TrEnum.TILE_1D, 4)

Using Polly Backend

from tadashi import TrEnum
from tadashi.translators import Polly

# Create a translator for C code using Polly backend
translator = Polly('clang')
translator.set_source('./examples/inputs/depnodep.c', [])

# Get the schedule tree
schedule_tree = translator.scops[0].schedule_tree

# Perform transformations
for node in schedule_tree:
    if node.node_type == 'BAND':
        # Apply transformations
        node.transform(TrEnum.INTERCHANGE, 0, 1)

Available Transformations

  • TrEnum.TILE_1D - 1D loop tiling
  • TrEnum.TILE_2D - 2D loop tiling
  • TrEnum.TILE_3D - 3D loop tiling
  • TrEnum.INTERCHANGE - Loop interchange
  • TrEnum.FULL_FUSE - Full loop fusion
  • TrEnum.FUSE - Loop fusion
  • TrEnum.SPLIT - Loop splitting
  • TrEnum.SCALE - Loop scaling
  • TrEnum.SET_PARALLEL - Set parallel execution
  • TrEnum.SET_LOOP_OPT - Set loop optimization options

Components

  • ccScop - C++ class representing SCoP
  • Scop - Python wrapper for SCoP operations
  • Node - Schedule tree node representation
  • Translators - Input format parsers:
    • Pet - Uses PET library
    • Polly - Uses LLVM Polly

Dependencies

  • ISL (Integer Set Library)
  • PET (Program Transformation)
  • LLVM/Polly (for Polly backend)
  • Cython
  • Python 3.8+

License

MIT License

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

tadashi-0.5.1.tar.gz (802.9 kB view details)

Uploaded Source

Built Distributions

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

tadashi-0.5.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.7 MB view details)

Uploaded CPython 3.14tmanylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

tadashi-0.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.7 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

tadashi-0.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.7 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

tadashi-0.5.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

tadashi-0.5.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

tadashi-0.5.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.6 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

tadashi-0.5.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

tadashi-0.5.1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.7 MB view details)

Uploaded CPython 3.8manylinux: glibc 2.27+ x86-64manylinux: glibc 2.28+ x86-64

File details

Details for the file tadashi-0.5.1.tar.gz.

File metadata

  • Download URL: tadashi-0.5.1.tar.gz
  • Upload date:
  • Size: 802.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for tadashi-0.5.1.tar.gz
Algorithm Hash digest
SHA256 03a87f5a84d03cb98b6c53289e38e788ea424b318fd6a5704d3dbba1d5c1a99f
MD5 2d32f27e4057beda1e95b1945b0451df
BLAKE2b-256 8124854a1f87f9c55dacae133dfa41cf72588376b6bca640b260cc53ff02a4a7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.1.tar.gz:

Publisher: build-and-upload.yaml on vatai/tadashi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tadashi-0.5.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0dc26154495fcab556f4efa77ee3b155f080558d4478e7e9df51910aa46ac0a4
MD5 56e002716ac9ccacc8163a51abc1d76e
BLAKE2b-256 da31e39581586a9e6f57cd5eb3b47fac9488733a314dc8adedcf04ff9850a575

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.1-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-upload.yaml on vatai/tadashi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tadashi-0.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5a6c9b0dc0a9b4456a73253f553db67d007217fb1c8e698f824f5618e5b01bb1
MD5 109c33994e00672a39807c34cea994b3
BLAKE2b-256 27eb0ed09f3f5a998555d9534f00dcb29957818a9636402595c863b1fda8c11c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.1-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-upload.yaml on vatai/tadashi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tadashi-0.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6389b56422ac5e7622c6f5591aa68b7aea260189e6c11178903e515016685fc9
MD5 cad6b89a92ab4dfcae79d4e84e3e9988
BLAKE2b-256 32f4fa2d50a212a7b72475507384a014f2ffc061af00eeac4a283d590f8aef80

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.1-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-upload.yaml on vatai/tadashi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tadashi-0.5.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 63e4d67f1872790d344b517b04646ded6a273276d4cc8bb1fadfb759dc8c7e26
MD5 c262ef524e731d871cd8806ea29beecf
BLAKE2b-256 21e8e2225999468e7fd4bde99cac203522b33e8199dd06564b88519dc8602dd6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.1-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-upload.yaml on vatai/tadashi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tadashi-0.5.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 13b597be36c9968cac10df112b7fec8ab1e9d6e7f52da5d98a1d73c5eab08ddf
MD5 345e38dae0f5c8c63a1539c4a22d8f5d
BLAKE2b-256 7e2492689bedbbde60714144579245f5b0a3d9f8c64f5f1bb9a6196c840ffbce

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.1-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-upload.yaml on vatai/tadashi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tadashi-0.5.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 164697e25c2d7f50003f07f9b5bdac167910623c933529ea419e678c18b37f34
MD5 ccf86c535be39feb8e2d29511f23f7b4
BLAKE2b-256 248a070c948b719e96e63039b2e8226cb5ff2ea1ae3fbacb59446e5084390ff0

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.1-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-upload.yaml on vatai/tadashi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tadashi-0.5.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e29b7465f660787cf13ae3971fad871c437bcbfdb4fb6baada7abbe4dd34b500
MD5 1e7dec8eb79a68ce5b6a2c12a7f62560
BLAKE2b-256 14e354a87d3d6bb55127a788514bf0be32abff9d887370e69e72273a99eab370

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.1-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-upload.yaml on vatai/tadashi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tadashi-0.5.1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7120c3a1a77170537a9597b0cd76641af4ea0c65b7a539858436bcaed5f75dc1
MD5 52f889b5a2834162659e8790b3644c47
BLAKE2b-256 866071ef4eaea2bda297be3a9ecdd837fd8203eaa74b6b655fc04cb76a7f14f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.1-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl:

Publisher: build-and-upload.yaml on vatai/tadashi

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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