Files
openvino/docs/snippets/cpu/ov_sparse_weights_decompression.py
Anton Voronov 63e0b47a7d [DOCS][CPU] Added sparse weights decompression feature description (#14730)
* [DOCS][CPU] Added sparse weights decompression feature description

* sparsity documentation fix

* fixed code snippet names

* moved code snippets into cpu folder

* review changes

* review fixes 2

* review fixes 3

* code style fix

* small fix
2022-12-20 22:15:44 +01:00

16 lines
504 B
Python

# Copyright (C) 2022 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
#
import openvino.runtime as ov
device_name = 'CPU'
xml_path = 'model.xml'
# ! [ov:intel_cpu:sparse_weights_decompression:part0]
core = ov.Core()
core.set_property("CPU", ov.properties.intel_cpu.sparse_weights_decompression_rate(0.8))
model = core.read_model(model=xml_path)
compiled_model = core.compile_model(model=model, device_name=device_name)
# ! [ov:intel_cpu:sparse_weights_decompression:part0]
assert compiled_model