Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
1 change: 1 addition & 0 deletions bindings/cpp/include/svs/runtime/api_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ enum class StorageKind {
FP16,
SQI8,
LVQ4x0,
LVQ8x0,
LVQ4x4,
LVQ4x8,
LeanVec4x4,
Expand Down
8 changes: 6 additions & 2 deletions bindings/cpp/src/svs_runtime_utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,8 @@ namespace storage {

// Consolidated storage kind checks using constexpr functions
inline constexpr bool is_lvq_storage(StorageKind kind) {
return kind == StorageKind::LVQ4x0 || kind == StorageKind::LVQ4x4 ||
kind == StorageKind::LVQ4x8;
return kind == StorageKind::LVQ4x0 || kind == StorageKind::LVQ8x0 ||
kind == StorageKind::LVQ4x4 || kind == StorageKind::LVQ4x8;
}

inline constexpr bool is_leanvec_storage(StorageKind kind) {
Expand Down Expand Up @@ -129,6 +129,7 @@ SVS_DEFINE_STORAGE_KIND_TAG(FP32);
SVS_DEFINE_STORAGE_KIND_TAG(FP16);
SVS_DEFINE_STORAGE_KIND_TAG(SQI8);
SVS_DEFINE_STORAGE_KIND_TAG(LVQ4x0);
SVS_DEFINE_STORAGE_KIND_TAG(LVQ8x0);
SVS_DEFINE_STORAGE_KIND_TAG(LVQ4x4);
SVS_DEFINE_STORAGE_KIND_TAG(LVQ4x8);
SVS_DEFINE_STORAGE_KIND_TAG(LeanVec4x4);
Expand Down Expand Up @@ -245,6 +246,7 @@ using LVQDatasetType = svs::quantization::lvq::LVQDataset<

// clang-format off
template <> struct StorageType<LVQ4x0Tag> { using type = LVQDatasetType<4, 0>; };
template <> struct StorageType<LVQ8x0Tag> { using type = LVQDatasetType<8, 0>; };
template <> struct StorageType<LVQ4x4Tag> { using type = LVQDatasetType<4, 4>; };
template <> struct StorageType<LVQ4x8Tag> { using type = LVQDatasetType<4, 8>; };
// clang-format on
Expand Down Expand Up @@ -332,6 +334,8 @@ auto dispatch_storage_kind(StorageKind kind, F&& f, Args&&... args) {
return f(SQI8Tag{}, std::forward<Args>(args)...);
case StorageKind::LVQ4x0:
return f(LVQ4x0Tag{}, std::forward<Args>(args)...);
case StorageKind::LVQ8x0:
return f(LVQ8x0Tag{}, std::forward<Args>(args)...);
case StorageKind::LVQ4x4:
return f(LVQ4x4Tag{}, std::forward<Args>(args)...);
case StorageKind::LVQ4x8:
Expand Down
Loading