Skip to content

Commit

Permalink
deploy: dc9328c
Browse files Browse the repository at this point in the history
  • Loading branch information
chensuyue committed Nov 14, 2023
1 parent a08e299 commit 9a54a28
Show file tree
Hide file tree
Showing 544 changed files with 2,310 additions and 527 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
:orphan:

:py:mod:`neural_compressor.common.base_config`
==============================================

.. py:module:: neural_compressor.common.base_config
Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

neural_compressor.common.base_config.BaseConfig



Functions
~~~~~~~~~

.. autoapisummary::

neural_compressor.common.base_config.register_config



.. py:function:: register_config(framework_name='None', algo_name=None)
Register config decorator.

The register the configuration classes for different algorithms within specific frameworks.

Usage example:
@register_config(framework_name="PyTorch", algo_name="ExampleAlgorithm")
class ExampleAlgorithmConfig:
# Configuration details for the ExampleAlgorithm

:param framework_name: the framework name. Defaults to "None".
:param algo_name: the algorithm name. Defaults to None.


.. py:class:: BaseConfig
The base config for all algorithm configs.


Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:orphan:

:py:mod:`neural_compressor.common`
==================================

.. py:module:: neural_compressor.common
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:orphan:

:py:mod:`neural_compressor.common.utility`
==========================================

.. py:module:: neural_compressor.common.utility
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:orphan:

:py:mod:`neural_compressor.torch.algorithms`
============================================

.. py:module:: neural_compressor.torch.algorithms
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:orphan:

:py:mod:`neural_compressor.torch.algorithms.rtn_quantize`
=========================================================

.. py:module:: neural_compressor.torch.algorithms.rtn_quantize
8 changes: 8 additions & 0 deletions latest/_sources/autoapi/neural_compressor/torch/index.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:orphan:

:py:mod:`neural_compressor.torch`
=================================

.. py:module:: neural_compressor.torch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
:orphan:

:py:mod:`neural_compressor.torch.quantization.config`
=====================================================

.. py:module:: neural_compressor.torch.quantization.config
Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

neural_compressor.torch.quantization.config.Backend
neural_compressor.torch.quantization.config.RTNWeightQuantConfig



Functions
~~~~~~~~~

.. autoapisummary::

neural_compressor.torch.quantization.config.get_default_rtn_config



.. py:class:: Backend
Generic enumeration.

Derive from this class to define new enumerations.


.. py:class:: RTNWeightQuantConfig(weight_dtype: str = 'int', weight_bits: int = 4, weight_group_size: int = 32, weight_sym: bool = True, act_dtype: str = 'fp32', enable_full_range: bool = False, enable_mse_search: bool = False, group_dim: int = 1)
Config class for round-to-nearest weight-only quantization.


.. py:function:: get_default_rtn_config() -> RTNWeightQuantConfig
Generate the default rtn config.

:returns: the default rtn config.


Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
:orphan:

:py:mod:`neural_compressor.torch.quantization`
==============================================

.. py:module:: neural_compressor.torch.quantization
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
:orphan:

:py:mod:`neural_compressor.torch.quantization.quantize`
=======================================================

.. py:module:: neural_compressor.torch.quantization.quantize
Module Contents
---------------


Functions
~~~~~~~~~

.. autoapisummary::

neural_compressor.torch.quantization.quantize.quantize



.. py:function:: quantize(model: torch.nn.Module, quant_config: neural_compressor.common.base_config.BaseConfig, calib_func: Callable = None, calib_func_arg: Any = None) -> torch.nn.Module
The main entry to quantize model.

:param model: a float model to be quantized.
:param quant_config: a quantization configuration.
:param calib_func: a calibration function for calibrating the model. Defaults to None.
:param calib_func_arg: positional arguments for `calib_func`. Defaults to None.

:returns: The quantized model.


Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
:orphan:

:py:mod:`neural_compressor.torch.utils`
=======================================

.. py:module:: neural_compressor.torch.utils
Module Contents
---------------


Functions
~~~~~~~~~

.. autoapisummary::

neural_compressor.torch.utils.register_algo



.. py:function:: register_algo(name)
Decorator function to register algorithms in the algos_mapping dictionary.

Usage example:
@register_algo(name=example_algo)
def example_algo(model: torch.nn.Module, quant_config: RTNWeightQuantConfig) -> torch.nn.Module:
...

:param name: The name under which the algorithm function will be registered.
:type name: str

:returns: The decorator function to be used with algorithm functions.
:rtype: decorator


2 changes: 1 addition & 1 deletion latest/autoapi/block_mask/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd554204160>
<jinja2.runtime.BlockReference object at 0x7fc454e7eaa0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ <h3>Functions<a class="headerlink" href="#functions" title="Permalink to this he
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd551f63430>
<jinja2.runtime.BlockReference object at 0x7fc44ff0e2c0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
2 changes: 1 addition & 1 deletion latest/autoapi/neural_compressor/adaptor/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ <h2>Package Contents<a class="headerlink" href="#package-contents" title="Permal
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd552671c90>
<jinja2.runtime.BlockReference object at 0x7fc4549da1a0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
2 changes: 1 addition & 1 deletion latest/autoapi/neural_compressor/adaptor/keras/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd553f03be0>
<jinja2.runtime.BlockReference object at 0x7fc45234f460>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd5535cd5a0>
<jinja2.runtime.BlockReference object at 0x7fc45327c250>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd553cb9e40>
<jinja2.runtime.BlockReference object at 0x7fc451edb100>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd55120ba90>
<jinja2.runtime.BlockReference object at 0x7fc450cd6590>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd551209210>
<jinja2.runtime.BlockReference object at 0x7fc451d1f580>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd557c32590>
<jinja2.runtime.BlockReference object at 0x7fc4517c70a0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd5512097e0>
<jinja2.runtime.BlockReference object at 0x7fc450cd6110>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd551347100>
<jinja2.runtime.BlockReference object at 0x7fc451edb7f0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
2 changes: 1 addition & 1 deletion latest/autoapi/neural_compressor/adaptor/mxnet/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd5513458a0>
<jinja2.runtime.BlockReference object at 0x7fc45234cac0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd55897cfd0>
<jinja2.runtime.BlockReference object at 0x7fc457648d00>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -677,7 +677,7 @@ <h3>Functions<a class="headerlink" href="#functions" title="Permalink to this he
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd551346aa0>
<jinja2.runtime.BlockReference object at 0x7fc452a4f4f0>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
2 changes: 1 addition & 1 deletion latest/autoapi/neural_compressor/adaptor/onnxrt/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd551347c10>
<jinja2.runtime.BlockReference object at 0x7fc4571b1510>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ <h3>Classes<a class="headerlink" href="#classes" title="Permalink to this headin
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd551344d30>
<jinja2.runtime.BlockReference object at 0x7fc457645f90>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ <h3>Functions<a class="headerlink" href="#functions" title="Permalink to this he
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd5522205b0>
<jinja2.runtime.BlockReference object at 0x7fc44ff0d480>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ <h2>Submodules<a class="headerlink" href="#submodules" title="Permalink to this
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
<jinja2.runtime.BlockReference object at 0x7fd551347010>
<jinja2.runtime.BlockReference object at 0x7fc451d1f340>
<p></p><div><a href='https://www.intel.com/content/www/us/en/privacy/intel-cookie-notice.html' data-cookie-notice='true'>Cookies</a> <a href='https://www.intel.com/content/www/us/en/privacy/intel-privacy-notice.html'>| Privacy</a></div>


Expand Down
Loading

0 comments on commit 9a54a28

Please sign in to comment.