ggml
[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)
Brought by drakestapleton
ggml / src / ggml-openvino / openvino / rt_info / weightless_caching_attributes.hpp
| 1 | // Copyright (C) 2018-2026 Intel Corporation |
| 2 | // SPDX-License-Identifier: Apache-2.0 |
| 3 | // |
| 4 | |
| 5 | #pragma once |
| 6 | |
| 7 | #include <openvino/core/core_visibility.hpp> |
| 8 | #include <openvino/core/node.hpp> |
| 9 | #include <openvino/core/runtime_attribute.hpp> |
| 10 | |
| 11 | namespace ov { |
| 12 | |
| 13 | /** |
| 14 | * @brief Holds weightless caching attributes of a single constant. |
| 15 | * |
| 16 | * WeightlessCacheAttribute class represents runtime info attribute that holds |
| 17 | * the values of original size of the constant in bytes and the binary offset of the |
| 18 | * constant's data in the weights file used by the weightless caching mechanism. It's |
| 19 | * not copyable in case the data was changed (the original node was replaced by a new |
| 20 | * one produced during the tranformation pipeline) - in that case weightless caching |
| 21 | * can't be used for that constant. |
| 22 | */ |
| 23 | class OPENVINO_API WeightlessCacheAttribute : public RuntimeAttribute { |
| 24 | public: |
| 25 | OPENVINO_RTTI("WeightlessCacheAttribute", "0", RuntimeAttribute) |
| 26 | |
| 27 | WeightlessCacheAttribute() = delete; |
| 28 | |
| 29 | WeightlessCacheAttribute(size_t original_size, size_t bin_offset, ov::element::Type original_dtype) |
| 30 | : original_size(original_size), |
| 31 | bin_offset(bin_offset), |
| 32 | original_dtype(original_dtype) {} |
| 33 | |
| 34 | bool is_copyable() const override; |
| 35 | |
| 36 | size_t original_size; |
| 37 | size_t bin_offset; |
| 38 | ov::element::Type original_dtype; |
| 39 | }; |
| 40 | |
| 41 | } // namespace ov |