diff options
author | Iwan Kawrakow <iwan.kawrakow@gmail.com> | 2024-07-24 19:33:19 +0300 |
---|---|---|
committer | Iwan Kawrakow <iwan.kawrakow@gmail.com> | 2024-07-24 19:33:19 +0300 |
commit | 9eee03f4eec5a67042c7c192fbf28994fabae5b8 (patch) | |
tree | dceecdeaa0e0621228a12c494a7da5b0305738be | |
parent | 3d83f58654a96c0a47d81eb0861e2211cf104089 (diff) |
Remove unused file
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | iqk-quantize.cpp | 1 | ||||
-rw-r--r-- | iqk-quantize.h | 46 | ||||
-rw-r--r-- | iqk_mul_mat.cpp | 1 |
4 files changed, 1 insertions, 49 deletions
@@ -708,7 +708,7 @@ OBJS += ggml-alloc.o ggml-backend.o ggml-quants.o unicode.o unicode-data.o COMMON_H_DEPS = common/common.h common/sampling.h common/log.h llama.h COMMON_DEPS = common.o sampling.o grammar-parser.o build-info.o json-schema-to-grammar.o -iqk-quantize.o: iqk-quantize.cpp iqk-quantize.h iqk_mul_mat.h ggml-quants.h ggml-common.h ggml.h ggml-impl.h +iqk-quantize.o: iqk-quantize.cpp iqk_mul_mat.h ggml-quants.h ggml-common.h ggml.h ggml-impl.h $(CXX) $(CXXFLAGS) -c $< -o $@ ifndef LLAMA_NO_IQK_MULMAT iqk_mul_mat.o: iqk_mul_mat.cpp ggml-impl.h ggml.h ggml-quants.h ggml-common.h iqk_mul_mat.h diff --git a/iqk-quantize.cpp b/iqk-quantize.cpp index f0b6eec4..08089152 100644 --- a/iqk-quantize.cpp +++ b/iqk-quantize.cpp @@ -13,7 +13,6 @@ // See the License for the specific language governing permissions and // limitations under the License. -#include "iqk-quantize.h" #if GGML_USE_IQK_MULMAT #include "iqk_mul_mat.h" #endif diff --git a/iqk-quantize.h b/iqk-quantize.h deleted file mode 100644 index b89c9427..00000000 --- a/iqk-quantize.h +++ /dev/null @@ -1,46 +0,0 @@ -#pragma once - -#include <stdint.h> - -typedef union { - float f; - uint32_t i; -} iq1bn_scale_t; - -#ifdef __cplusplus -extern "C" { -#endif - -#ifdef BITNET_IQ1BN_4x4 -static inline float iq1bn_min_value(void) { return 1.9074e-06f; } -static inline float iq1bn_max_value(void) { return 0.12109f; } -#else -static inline float iq1bn_min_value(void) { return 0.000488281f; } -static inline float iq1bn_max_value(void) { return 0.123047f; } -#endif - -static inline uint8_t iq1bn_float_to_fp8(float f) { - if (f <= iq1bn_min_value()) return 0; - if (f >= iq1bn_max_value()) return 255; - iq1bn_scale_t s; - s.f = f; -#ifdef BITNET_IQ1BN_4x4 - return ((((s.i >> 23) + 132) & 0xf) << 4) | ((s.i >> 19) & 0xf); -#else - return ((s.i >> 18) & 0x1f) | (((s.i >> 23) - 116) << 5); -#endif -} - -static inline float iq1bn_fp8_to_float(uint8_t fp8) { - iq1bn_scale_t s; -#ifdef BITNET_IQ1BN_4x4 - s.i = ((((fp8 >> 4) | 0xf0) - 132) << 23) | ((fp8 & 0x0f) << 19); -#else - s.i = (((fp8 >> 5) + 116) << 23) | ((fp8 & 0x1f) << 18); -#endif - return s.f; -} - -#ifdef __cplusplus -} -#endif diff --git a/iqk_mul_mat.cpp b/iqk_mul_mat.cpp index b29e182b..83ef6d5b 100644 --- a/iqk_mul_mat.cpp +++ b/iqk_mul_mat.cpp @@ -31,7 +31,6 @@ #include "ggml-impl.h" #include "ggml-quants.h" #include "iqk_mul_mat.h" -#include "iqk-quantize.h" #define GGML_COMMON_IMPL_C #include "ggml-common.h" |