MCPcopy Create free account
hub / github.com/bitsandbytes-foundation/bitsandbytes / get_global_lut

Function get_global_lut

csrc/cpu_ops.cpp:563–566  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

561static std::mutex g_lut_mutex;
562
563static const unsigned char* get_global_lut(const float* code) {
564 std::lock_guard<std::mutex> lock(g_lut_mutex);
565 return g_lut_cache.get_lut(code);
566}
567
568// Convert a normalized value in [-1, 1] to LUT index [0, 65535]
569static inline uint16_t norm_to_lut_index(float val) {

Callers 1

quantize_cpu_implFunction · 0.85

Calls 1

get_lutMethod · 0.80

Tested by

no test coverage detected