cui-llama.rn 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -61,6 +61,7 @@ build_library("rnllama" "")
|
|
61
61
|
|
62
62
|
if (${ANDROID_ABI} STREQUAL "arm64-v8a")
|
63
63
|
# ARM64 targets
|
64
|
+
build_library("rnllama_v8_4_fp16_dotprod_i8mm" "-march=armv8.4-a+fp16+dotprod+i8mm")
|
64
65
|
build_library("rnllama_v8_4_fp16_dotprod" "-march=armv8.4-a+fp16+dotprod")
|
65
66
|
build_library("rnllama_v8_2_fp16_dotprod" "-march=armv8.2-a+fp16+dotprod")
|
66
67
|
build_library("rnllama_v8_2_fp16" "-march=armv8.2-a+fp16")
|
@@ -281,8 +281,12 @@ public class LlamaContext {
|
|
281
281
|
boolean hasDotProd = cpuFeatures.contains("dotprod") || cpuFeatures.contains("asimddp");
|
282
282
|
boolean isAtLeastArmV82 = cpuFeatures.contains("asimd") && cpuFeatures.contains("crc32") && cpuFeatures.contains("aes");
|
283
283
|
boolean isAtLeastArmV84 = cpuFeatures.contains("dcpop") && cpuFeatures.contains("uscat");
|
284
|
+
boolean hasInt8Matmul = cpuFeatures.contains("i8mm");
|
284
285
|
|
285
|
-
if (isAtLeastArmV84 && hasFp16 && hasDotProd) {
|
286
|
+
if (isAtLeastArmV84 && hasFp16 && hasDotProd && hasInt8Matmul) {
|
287
|
+
Log.d(NAME, "Loading librnllama_v8_4_fp16_dotprod_i8mm.so");
|
288
|
+
System.loadLibrary("rnllama_v8_4_fp16_dotprod_i8mm");
|
289
|
+
} else if (isAtLeastArmV84 && hasFp16 && hasDotProd) {
|
286
290
|
Log.d(NAME, "Loading librnllama_v8_4_fp16_dotprod.so");
|
287
291
|
System.loadLibrary("rnllama_v8_4_fp16_dotprod");
|
288
292
|
} else if (isAtLeastArmV82 && hasFp16 && hasDotProd) {
|