Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@
},
"source": [
"## Target Platform Capabilities\n",
"MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Tensorflow TPC:"
"MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the TPC object for imx500 hardware with version 1.0:"
]
},
{
Expand All @@ -233,8 +233,8 @@
"source": [
"import model_compression_toolkit as mct\n",
"\n",
"# Get a TargetPlatformCapabilities object that models the hardware platform for the quantized model inference. Here, for example, we use the default platform that is attached to a Pytorch layers representation.\n",
"target_platform_cap = mct.get_target_platform_capabilities('pytorch', 'default')"
"# Get a TargetPlatformCapabilities object that models the hardware platform for the quantized model inference. Here, for example, we use the TPC object for imx500 hardware with version 1.0.\n",
"target_platform_cap = mct.get_target_platform_capabilities(tpc_version='1.0', device_type='imx500')"
]
},
{
Expand Down Expand Up @@ -749,7 +749,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "torch1 (3.10.12)",
"display_name": "py310-mct251_tpc (3.10.12)",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@
},
"source": [
"## Target Platform Capabilities\n",
"MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Torch TPC:"
"MCT optimizes the model for dedicated hardware. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the TPC object for imx500 hardware with version 1.0:"
]
},
{
Expand All @@ -246,8 +246,8 @@
"source": [
"import model_compression_toolkit as mct\n",
"\n",
"# Get a TargetPlatformCapabilities object that models the hardware platform for the quantized model inference. Here, for example, we use the default platform that is attached to a Pytorch layers representation.\n",
"target_platform_cap = mct.get_target_platform_capabilities('pytorch', 'default')"
"# Get a TargetPlatformCapabilities object that models the hardware platform for the quantized model inference. Here, for example, we use the TPC object for imx500 hardware with version 1.0.\n",
"target_platform_cap = mct.get_target_platform_capabilities(tpc_version='1.0', device_type='imx500')"
]
},
{
Expand Down Expand Up @@ -753,7 +753,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "torch2 (3.10.12)",
"display_name": "py310-mct251_tpc (3.10.12)",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@
"In order to evaulate our generated images, we will use them to quantize the model using MCT's PTQ.This is referred to as **\"Zero-Shot Quantization (ZSQ)\"** or **\"Data-Free Quantization\"** because no real data is used in the quantization process. Next we will define configurations for MCT's PTQ.\n",
"\n",
"### Target Platform Capabilities (TPC)\n",
"MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Pytorch TPC:"
"MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the TPC object for imx500 hardware with version 1.0:"
]
},
{
Expand All @@ -232,7 +232,7 @@
},
"outputs": [],
"source": [
"target_platform_cap = mct.get_target_platform_capabilities(\"pytorch\", \"default\")"
"target_platform_cap = mct.get_target_platform_capabilities(tpc_version='1.0', device_type='imx500')"
]
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,8 @@
"source": [
"## Target Platform Capabilities (TPC)\n",
"In addition, MCT optimizes models for dedicated hardware platforms using Target Platform Capabilities (TPC). \n",
"**Note:** To apply mixed-precision quantization to specific layers, the TPC must define different bit-width options for those layers. For more details, please refer to our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html). In this example, we use the default PyTorch TPC, which supports 2, 4, and 8-bit options for convolution and linear layers."
"\n",
"**Note:** To apply mixed-precision quantization to specific layers, the TPC must define different bit-width options for those layers. For more details, please refer to our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html). In this example, we use the TPC object for imx500 hardware with version 1.0, which supports 2, 4, and 8-bit options for convolution and linear layers."
]
},
{
Expand All @@ -197,8 +198,8 @@
"source": [
"import model_compression_toolkit as mct\n",
"\n",
"# Get a FrameworkQuantizationCapabilities object that models the hardware platform for the quantized model inference. Here, for example, we use the default platform that is attached to a Pytorch layers representation.\n",
"target_platform_cap = mct.get_target_platform_capabilities('pytorch', 'default')"
"# Get a TargetPlatformCapabilities object that models the hardware platform for the quantized model inference. Here, for example, we use the TPC object for imx500 hardware with version 1.0.\n",
"target_platform_cap = mct.get_target_platform_capabilities(tpc_version='1.0', device_type='imx500')"
]
},
{
Expand Down Expand Up @@ -451,7 +452,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "torch6 (3.10.12)",
"display_name": "py310-mct251_tpc (3.10.12)",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
"gptq_config = mct.gptq.get_pytorch_gptq_config(n_epochs=50)\n",
"\n",
"# Specify the target platform capability (TPC)\n",
"tpc = mct.get_target_platform_capabilities(\"pytorch\", 'imx500', target_platform_version='v1')"
"tpc = mct.get_target_platform_capabilities(tpc_version='1.0', device_type='imx500')"
]
},
{
Expand Down Expand Up @@ -432,7 +432,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "torch7 (3.10.12)",
"display_name": "py310-mct251_tpc (3.10.12)",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
},
"source": [
"## Target Platform Capabilities (TPC)\n",
"In addition, MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Pytorch TPC:"
"In addition, MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the TPC object for imx500 hardware with version 1.0:"
]
},
{
Expand All @@ -196,8 +196,8 @@
"source": [
"import model_compression_toolkit as mct\n",
"\n",
"# Get a FrameworkQuantizationCapabilities object that models the hardware platform for the quantized model inference. Here, for example, we use the default platform that is attached to a Pytorch layers representation.\n",
"target_platform_cap = mct.get_target_platform_capabilities('pytorch', 'default')"
"# Get a TargetPlatformCapabilities object that models the hardware platform for the quantized model inference. Here, for example, we use the TPC object for imx500 hardware with version 1.0.\n",
"target_platform_cap = mct.get_target_platform_capabilities(tpc_version='1.0', device_type='imx500')"
]
},
{
Expand Down Expand Up @@ -403,7 +403,7 @@
"provenance": []
},
"kernelspec": {
"display_name": "torch8 (3.10.12)",
"display_name": "py310-mct251_tpc (3.10.12)",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@
"metadata": {},
"source": [
"## Target Platform Capabilities (TPC)\n",
"In addition, MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Pytorch TPC:"
"In addition, MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the TPC object for imx500 hardware with version 1.0:"
]
},
{
Expand All @@ -356,7 +356,7 @@
"source": [
"import model_compression_toolkit as mct\n",
"\n",
"tpc = mct.get_target_platform_capabilities('pytorch', 'default')"
"tpc = mct.get_target_platform_capabilities(tpc_version='1.0', device_type='imx500')"
]
},
{
Expand Down Expand Up @@ -533,7 +533,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "py310-deeplabv3ptest (3.10.12)",
"display_name": "py310-mct251_tpc (3.10.12)",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -562,7 +562,7 @@
"metadata": {},
"source": [
"## Target Platform Capabilities (TPC)\n",
"In addition, MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Pytorch TPC:"
"In addition, MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the TPC object for imx500 hardware with version 1.0:"
]
},
{
Expand All @@ -574,7 +574,7 @@
"source": [
"import model_compression_toolkit as mct\n",
"\n",
"tpc = mct.get_target_platform_capabilities('pytorch', 'default')"
"tpc = mct.get_target_platform_capabilities(tpc_version='1.0', device_type='imx500')"
]
},
{
Expand Down Expand Up @@ -806,7 +806,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "torch12 (3.10.12)",
"display_name": "py310-mct251_tpc (3.10.12)",
"language": "python",
"name": "python3"
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@
"metadata": {},
"source": [
"## Target Platform Capabilities (TPC)\n",
"In addition, MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the default Pytorch TPC:"
"In addition, MCT optimizes the model for dedicated hardware platforms. This is done using TPC (for more details, please visit our [documentation](https://sonysemiconductorsolutions.github.io/mct-model-optimization/api/api_docs/modules/target_platform_capabilities.html)). Here, we use the TPC object for imx500 hardware with version 1.0:"
]
},
{
Expand All @@ -540,7 +540,7 @@
"metadata": {},
"outputs": [],
"source": [
"tpc = mct.get_target_platform_capabilities('pytorch', 'default')"
"tpc = mct.get_target_platform_capabilities(tpc_version='1.0', device_type='imx500')"
]
},
{
Expand Down Expand Up @@ -738,7 +738,7 @@
],
"metadata": {
"kernelspec": {
"display_name": "torch13 (3.10.12)",
"display_name": "py310-mct251_tpc (3.10.12)",
"language": "python",
"name": "python3"
},
Expand Down