@fugood/llama.node 1.0.0-beta.3 → 1.0.0-beta.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.
Files changed (2) hide show
  1. package/CMakeLists.txt +10 -0
  2. package/package.json +14 -14
package/CMakeLists.txt CHANGED
@@ -35,6 +35,7 @@ string(REPLACE "arm64x" "arm64" ARCH ${ARCH})
35
35
  string(REPLACE "aarch64" "arm64" ARCH ${ARCH})
36
36
 
37
37
  option(TO_PACKAGE "Build as package" OFF)
38
+ option(CLANG_USE_OMP "Use OpenMP in Clang" OFF)
38
39
 
39
40
  if(DEFINED VARIANT)
40
41
  set(VARIANT -${VARIANT})
@@ -96,6 +97,15 @@ if (VULKAN_SDK)
96
97
  find_package(Vulkan REQUIRED)
97
98
  endif()
98
99
 
100
+ # Avoid libomp is not installed commonly
101
+ if (CMAKE_CXX_COMPILER_ID STREQUAL "Clang" AND NOT DEFINED GGML_OPENMP OR GGML_OPENMP AND NOT CLANG_USE_OMP)
102
+ find_package(OpenMP)
103
+ if (OpenMP_FOUND)
104
+ string(REPLACE "libomp" "libgomp" OpenMP_CXX_FLAGS "${OpenMP_CXX_FLAGS}")
105
+ string(REPLACE "libomp" "libgomp" OpenMP_C_FLAGS "${OpenMP_C_FLAGS}")
106
+ endif()
107
+ endif()
108
+
99
109
  set(LLAMA_BUILD_COMMON ON CACHE BOOL "Build common")
100
110
 
101
111
  set(LLAMA_CURL OFF CACHE BOOL "Build curl")
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@fugood/llama.node",
3
3
  "access": "public",
4
- "version": "1.0.0-beta.3",
4
+ "version": "1.0.0-beta.4",
5
5
  "description": "An another Node binding of llama.cpp",
6
6
  "main": "lib/index.js",
7
7
  "scripts": {
@@ -70,19 +70,19 @@
70
70
  "CMakeLists.txt"
71
71
  ],
72
72
  "optionalDependencies": {
73
- "@fugood/node-llama-linux-x64": "1.0.0-beta.3",
74
- "@fugood/node-llama-linux-x64-vulkan": "1.0.0-beta.3",
75
- "@fugood/node-llama-linux-x64-cuda": "1.0.0-beta.3",
76
- "@fugood/node-llama-linux-arm64": "1.0.0-beta.3",
77
- "@fugood/node-llama-linux-arm64-vulkan": "1.0.0-beta.3",
78
- "@fugood/node-llama-linux-arm64-cuda": "1.0.0-beta.3",
79
- "@fugood/node-llama-win32-x64": "1.0.0-beta.3",
80
- "@fugood/node-llama-win32-x64-vulkan": "1.0.0-beta.3",
81
- "@fugood/node-llama-win32-x64-cuda": "1.0.0-beta.3",
82
- "@fugood/node-llama-win32-arm64": "1.0.0-beta.3",
83
- "@fugood/node-llama-win32-arm64-vulkan": "1.0.0-beta.3",
84
- "@fugood/node-llama-darwin-x64": "1.0.0-beta.3",
85
- "@fugood/node-llama-darwin-arm64": "1.0.0-beta.3"
73
+ "@fugood/node-llama-linux-x64": "1.0.0-beta.4",
74
+ "@fugood/node-llama-linux-x64-vulkan": "1.0.0-beta.4",
75
+ "@fugood/node-llama-linux-x64-cuda": "1.0.0-beta.4",
76
+ "@fugood/node-llama-linux-arm64": "1.0.0-beta.4",
77
+ "@fugood/node-llama-linux-arm64-vulkan": "1.0.0-beta.4",
78
+ "@fugood/node-llama-linux-arm64-cuda": "1.0.0-beta.4",
79
+ "@fugood/node-llama-win32-x64": "1.0.0-beta.4",
80
+ "@fugood/node-llama-win32-x64-vulkan": "1.0.0-beta.4",
81
+ "@fugood/node-llama-win32-x64-cuda": "1.0.0-beta.4",
82
+ "@fugood/node-llama-win32-arm64": "1.0.0-beta.4",
83
+ "@fugood/node-llama-win32-arm64-vulkan": "1.0.0-beta.4",
84
+ "@fugood/node-llama-darwin-x64": "1.0.0-beta.4",
85
+ "@fugood/node-llama-darwin-arm64": "1.0.0-beta.4"
86
86
  },
87
87
  "devDependencies": {
88
88
  "@babel/preset-env": "^7.24.4",