diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 59ad77be..3dcf2a1b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -133,7 +133,7 @@ jobs: - name: Install Cuda 13.0 on Windows (1) if: matrix.config.name == 'Windows (1)' shell: bash - timeout-minutes: 30 + timeout-minutes: 60 run: | curl -Lo cuda_13.0.0_windows_network.exe https://developer.download.nvidia.com/compute/cuda/13.0.0/network_installers/cuda_13.0.0_windows_network.exe diff --git a/llama/addon/globals/addonLog.h b/llama/addon/globals/addonLog.h index 26542880..cc15681e 100644 --- a/llama/addon/globals/addonLog.h +++ b/llama/addon/globals/addonLog.h @@ -2,6 +2,7 @@ #include "llama.h" #include "napi.h" + struct addon_logger_log { public: const int logLevelNumber; diff --git a/llama/gpuInfo/vulkan-gpu-info.cpp b/llama/gpuInfo/vulkan-gpu-info.cpp index c1c42316..72beb2b9 100644 --- a/llama/gpuInfo/vulkan-gpu-info.cpp +++ b/llama/gpuInfo/vulkan-gpu-info.cpp @@ -42,18 +42,17 @@ static bool enumerateVulkanDevices(size_t* total, size_t* used, size_t* unifiedM physicalDevice.getMemoryProperties2(&memProps2); for (uint32_t i = 0; i < memProps.memoryHeapCount; ++i) { - const auto flags = memProps.memoryHeaps[i].flags; + const auto heap = memProps2.memoryProperties.memoryHeaps[i]; - if (flags & vk::MemoryHeapFlagBits::eDeviceLocal) { - const auto size = memProps.memoryHeaps[i].size; - totalMem += size; - usedMem += memoryBudgetProperties.heapUsage[i]; + if (heap.flags & vk::MemoryHeapFlagBits::eDeviceLocal) { + totalMem += heap.size; + usedMem += memoryBudgetProperties.heapUsage[i] + (heap.size - memoryBudgetProperties.heapBudget[i]); - if (flags & vk::MemoryHeapFlagBits::eMultiInstance) { - totalUnifiedMemorySize += size; + if (heap.flags & vk::MemoryHeapFlagBits::eMultiInstance) { + totalUnifiedMemorySize += heap.size; } - if (size > 0 && addDeviceNames) { + if (heap.size > 0 && addDeviceNames) { (*deviceNames).push_back(std::string(deviceProps.deviceName.data())); } diff --git a/templates/electron-typescript-react/electron/state/llmState.ts b/templates/electron-typescript-react/electron/state/llmState.ts index 21558b52..acb8d435 100644 --- a/templates/electron-typescript-react/electron/state/llmState.ts +++ b/templates/electron-typescript-react/electron/state/llmState.ts @@ -307,6 +307,7 @@ export const llmFunctions = { try { await chatSession?.preloadPrompt("", { + functions: modelFunctions, // these won't be called, but are used to avoid redundant context shifts signal: promptAbortController?.signal }); } catch (err) {