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 (Single Collection Optimization Problems) 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.0.tar.gz (795.3 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.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.6 MB view details)

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

tadashi-0.5.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.6 MB view details)

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

tadashi-0.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.6 MB view details)

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

tadashi-0.5.0-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.0-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.0-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.0-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.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl (78.6 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.0.tar.gz.

File metadata

  • Download URL: tadashi-0.5.0.tar.gz
  • Upload date:
  • Size: 795.3 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.0.tar.gz
Algorithm Hash digest
SHA256 631d219f55458d294cb65b4281b841cebe235864879f28e6a3ee134dcb208c6d
MD5 c62a2716290deca3d96787335d2cd984
BLAKE2b-256 fdb971f3db0a69d582d776bfac9f1b3cb5abe8d3ee5eb0be0adc6ac8f8f8b614

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.0.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.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.0-cp314-cp314t-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bfa9e7fd15ce780bcf21d92849b9e249400eb15ccc51f36ca6acd48811225936
MD5 0499cacff0ae7449c3fb865344f51cf5
BLAKE2b-256 670190dcc1e7b6f47d82df765d1b9c7a5e69fd10d149d637370fe65324e5cd6c

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.0-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.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.0-cp314-cp314-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f74fd488a85260c4953c210afe09aebc8b423f7220acca532f9e473dc19e06ed
MD5 1db1318cc1b72fe38e01f7487bbfe8b7
BLAKE2b-256 39c9248c0b2c503df334d012935bfdf16d1fb3f321b22db5de24963c1eab0164

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.0-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.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.0-cp313-cp313-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0d7979b05eec5a886d4000c43d17429895254588fc61a5abc082727fecb5e24f
MD5 d71dab1bb30b4709a609ed6d354d64f8
BLAKE2b-256 c931127a4809451a88bfc4245024dcb7e61a50b549a7bcdb08b18b42f3e04380

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.0-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.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.0-cp312-cp312-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a47007a6310ebbfaa14d6f977aa236276971e178bb8a9fe7ad341308a0dec87b
MD5 f686de383e0645ca812068a504d2f041
BLAKE2b-256 cd4a98b04e2cc0cf30c6437ecaa4fc60d9d716fe6058122b74adf03dae89974a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.0-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.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.0-cp311-cp311-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d8566955c3dd0e5af23dd1a004236072a2343db715f5fe8923718cd02752b25e
MD5 dbd09f2fc0aae8c639b682c53b05dd22
BLAKE2b-256 a22b067d87ee1e8b0226f89384bcd3f83fe17200caf8bc884ebde12151cd602a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.0-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.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.0-cp310-cp310-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ee3e811877781c21e17be35c12c160e320ab43d1fea494ae44bc4eb69bf624a1
MD5 d523c2cd513dee761543a415f73d5c37
BLAKE2b-256 b677094de9785142b9a3f60120abbe2f5a387b1c656dad72aee7a7f7f588f2df

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.0-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.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.0-cp39-cp39-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 95ae61ee45721c6933c7b655f6bda66e901bcc35e6e7a072be85e1c2f9d0ad3a
MD5 744376b44478bfc70fe8a699c46499bc
BLAKE2b-256 29611f858fecb5c413cf97ce07c4b6849032f7bb012ccd6b90ef646c61ef593a

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.0-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.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for tadashi-0.5.0-cp38-cp38-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 401a0360a7815529af153dbcdb5bd74a7bf004f8fa1953a4ffd07639b0e8d7b6
MD5 f7b7476bf9fa7629f8d052bd0b113a21
BLAKE2b-256 1b2bea9335f7cdbf8fe26ec507f44f15794ee7ec9d77eb261f7699a0fed57a32

See more details on using hashes here.

Provenance

The following attestation bundles were made for tadashi-0.5.0-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