Skip to main content

EdgeMDT TPC package

Project description


Getting Started

Quick Installation

To install the TPC package, run:

pip install edge-mdt-tpc 

Using the TPC

To initialize a TPC and integrate it with MCT, use the get_target_platform_capabilities function as follows:

from edgemdt_tpc import get_target_platform_capabilities
import model_compression_toolkit as mct

# Get a TPC object representing the imx500 hardware and use it for PyTorch model quantization in MCT
tpc = get_target_platform_capabilities(tpc_version='1.0', device_type='imx500')

# Apply MCT on your pre-trained model using the TPC
quantized_model, quantization_info = mct.ptq.pytorch_post_training_quantization(
    in_module=pretrained_model, # Replace with your pretrained model.
    representative_data_gen=dataset, # Replace with your representative dataset.
    target_resource_utilization=tpc)

Supported Versions

Supported Versions Table
TPC 1.0 TPC 4.0
IMX500 Converter 3.14 Run Tests

Not supported

IMX500 Converter 3.16 Run Tests Run Tests

Target Platform Capabilities (TPC)

About

TPC is our way of describing the hardware that will be used to run and infer with models that are optimized using the MCT. The TPC includes different parameters that are relevant to the hardware during inference (e.g., number of bits used in some operator for its weights/activations, fusing patterns, etc.)

License

The EdgeMDT-TPC package is licensed under Apache License Version 2.0. By contributing to the project, you agree to the license and copyright terms therein and release your contribution under these terms.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

edge_mdt_tpc-1.2.0-py3-none-any.whl (30.8 kB view details)

Uploaded Python 3

File details

Details for the file edge_mdt_tpc-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: edge_mdt_tpc-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 30.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.13

File hashes

Hashes for edge_mdt_tpc-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b4721eeb979d96a97f58b73f2b3d764a77ea2285fcf9ffc6bc99747ea562ecb4
MD5 39441f6f32bfa180bb39291b0d5b774d
BLAKE2b-256 b9f08d864d0404bf1ec2355530776fe33f4a8a5cc268e861bb91194dfe34e99b

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