From nobody Tue Aug 06 22:32:58 2024 X-Original-To: dev-commits-ports-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Wdp3Z1ldpz5SnBF; Tue, 06 Aug 2024 22:32:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Wdp3Z0zJwz4hT5; Tue, 6 Aug 2024 22:32:58 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722983578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkBngJwRH/KD5rKZohrsH38e+ptlI/OU1CAh+Da1Z/U=; b=CoLnbHTVCkQcdOUJJNk1FqoWtUkCg3mBoir4nztIlRyhpVT9FMUUYE2FWvmZB1xG51dsjv P+4aMlnnk+S2pNtTPLmaJQZIpxkbdzIVoxAF5g16Of53op8NYNXyX0TUEfgPCff4aL1YZX NRgj2kCmOpbUzj7bLWAIqrJUjmsTf6+xVMVoSP0O/UQGeplINvKIxyoHH/1V8FNQ9Cw1AQ 7KebV0VoolBs/QIIMNALae/uOwYohXLeUJUqX+vfRAG4lQ88cqcGpxjg8SgztULle5EJkb QtL/TzL0DKTH+JgQCnrRlYXNncqJ3dkegOO/OtToeaQfV4S2y6Pl6fDWRPfynw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722983578; a=rsa-sha256; cv=none; b=Ns5DstuEolbKRy68WpvXwhkS4JxG6LvebgdJa/kzKo7X9ySVCuePEjZFKdPcxtpoyfS6qw hQVG4k04m9ghUkiXstiiEz7OHP8nTVi+U3sVTqyDN2UDbWqTDaOAhc3VEhu8/B5zx6Z+hl O4Y7swKHbBKtyVWOLnPyjlr4v592Bf+Xl+5LneG6v6oAp+V/jio65ZbRU9PykHmHgat6d4 5qsnfg6EnED3qTD6P/ljj3f2tdoLU1sRz4QR3JUtVraT7iJWaWMOL+eh1XXDVPEYuoXtQg ViZmZ71SQ7CG2zYy8g8L0R7PLFvBnTRyUwCMXS4NL2+UbhTNeiQLKJtDrGiV3g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722983578; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=AkBngJwRH/KD5rKZohrsH38e+ptlI/OU1CAh+Da1Z/U=; b=idPff3dfdP7ojLmLb+/zVTH6I7qWoQe1uJZZHsN8wWFASRxguycuJnJKo3W881cDzYtAhb 2oJwHkFtakJ7aXvXZlGrRtoLpJAZ5coXvLU/r6nZiSfX6JuykuYtHvLDdUa/VtZUFCp0I7 uFL3IQRWuOSEI/tTsUgiglEOQhJcILgnHWNqEZ1JL6TFhMaBaOtne6kwSaGezlLYHGgPF6 srN0m6gwtfD4OaqoKfBOTXDLgc9Q3zR3UHp9WAM8B7DLLWtZpeGNLU281Lkp01NP5hG0o2 fq+64oV0PV13kAC3WREuhSXpMMr3Nh9VqgCwc32Zf5TKRNVh5eR6KEUrf09WMQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Wdp3Z0ZY3zQHV; Tue, 6 Aug 2024 22:32:58 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 476MWwh4085666; Tue, 6 Aug 2024 22:32:58 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 476MWw8h085663; Tue, 6 Aug 2024 22:32:58 GMT (envelope-from git) Date: Tue, 6 Aug 2024 22:32:58 GMT Message-Id: <202408062232.476MWw8h085663@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: b555acda955e - main - misc/ollama: Remove one unnecessary architecture-specific place in scripts List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-all@freebsd.org Sender: owner-dev-commits-ports-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b555acda955e9ef31e8132a82a6b15999cf31256 Auto-Submitted: auto-generated The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=b555acda955e9ef31e8132a82a6b15999cf31256 commit b555acda955e9ef31e8132a82a6b15999cf31256 Author: Yuri Victorovich AuthorDate: 2024-08-06 22:32:12 +0000 Commit: Yuri Victorovich CommitDate: 2024-08-06 22:32:55 +0000 misc/ollama: Remove one unnecessary architecture-specific place in scripts --- misc/ollama/files/patch-FreeBSD-compatibility | 84 ++++++++++++--------------- 1 file changed, 37 insertions(+), 47 deletions(-) diff --git a/misc/ollama/files/patch-FreeBSD-compatibility b/misc/ollama/files/patch-FreeBSD-compatibility index 02af4cec63c0..03cc31011ab1 100644 --- a/misc/ollama/files/patch-FreeBSD-compatibility +++ b/misc/ollama/files/patch-FreeBSD-compatibility @@ -125,9 +125,9 @@ new file mode 100644 case "linux", "windows": assert.Greater(t, info.TotalMemory, uint64(0)) assert.Greater(t, info.FreeMemory, uint64(0)) ---- llm/generate/gen_bsd.sh.orig 2024-08-06 07:41:26 UTC +--- llm/generate/gen_bsd.sh.orig 2024-08-06 16:29:05 UTC +++ llm/generate/gen_bsd.sh -@@ -0,0 +1,64 @@ +@@ -0,0 +1,54 @@ +#!/bin/sh +# This script is intended to run inside the go generate +# working directory must be ./llm/generate/ @@ -143,52 +143,42 @@ new file mode 100644 +COMMON_BSD_DEFS="-DCMAKE_SYSTEM_NAME=$(uname -s)" +CMAKE_TARGETS="--target llama --target ggml" + -+case "${GOARCH}" in -+ "amd64") -+ COMMON_CPU_DEFS="${COMMON_BSD_DEFS} -DCMAKE_SYSTEM_PROCESSOR=${ARCH}" -+ -+ # Static build for linking into the Go binary -+ init_vars -+ CMAKE_DEFS="${COMMON_CPU_DEFS} -DBUILD_SHARED_LIBS=off -DLLAMA_ACCELERATE=off -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off ${CMAKE_DEFS}" -+ BUILD_DIR="../build/bsd/${ARCH}_static" -+ echo "Building static library" -+ build -+ -+ init_vars -+ CMAKE_DEFS="${COMMON_CPU_DEFS} -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off ${CMAKE_DEFS}" -+ BUILD_DIR="../build/bsd/${ARCH}/cpu" -+ echo "Building LCD CPU" -+ build -+ compress -+ -+ init_vars -+ CMAKE_DEFS="${COMMON_CPU_DEFS} -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off ${CMAKE_DEFS}" -+ BUILD_DIR="../build/bsd/${ARCH}/cpu_avx" -+ echo "Building AVX CPU" -+ build -+ compress -+ -+ init_vars -+ CMAKE_DEFS="${COMMON_CPU_DEFS} -DLLAMA_AVX=on -DLLAMA_AVX2=on -DLLAMA_AVX512=off -DLLAMA_FMA=on -DLLAMA_F16C=on ${CMAKE_DEFS}" -+ BUILD_DIR="../build/bsd/${ARCH}/cpu_avx2" -+ echo "Building AVX2 CPU" -+ build -+ compress -+ -+ init_vars -+ CMAKE_DEFS="${COMMON_CPU_DEFS} -DLLAMA_VULKAN=on ${CMAKE_DEFS}" -+ BUILD_DIR="../build/bsd/${ARCH}/vulkan" -+ echo "Building Vulkan GPU" -+ build -+ compress -+ ;; ++COMMON_CPU_DEFS="${COMMON_BSD_DEFS} -DCMAKE_SYSTEM_PROCESSOR=${ARCH}" + -+ *) -+ echo "GOARCH must be set" -+ echo "this script is meant to be run from within go generate" -+ exit 1 -+ ;; -+esac ++# Static build for linking into the Go binary ++init_vars ++CMAKE_DEFS="${COMMON_CPU_DEFS} -DBUILD_SHARED_LIBS=off -DLLAMA_ACCELERATE=off -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off ${CMAKE_DEFS}" ++BUILD_DIR="../build/bsd/${ARCH}_static" ++echo "Building static library" ++build ++ ++init_vars ++CMAKE_DEFS="${COMMON_CPU_DEFS} -DLLAMA_AVX=off -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off ${CMAKE_DEFS}" ++BUILD_DIR="../build/bsd/${ARCH}/cpu" ++echo "Building LCD CPU" ++build ++compress ++ ++init_vars ++CMAKE_DEFS="${COMMON_CPU_DEFS} -DLLAMA_AVX=on -DLLAMA_AVX2=off -DLLAMA_AVX512=off -DLLAMA_FMA=off -DLLAMA_F16C=off ${CMAKE_DEFS}" ++BUILD_DIR="../build/bsd/${ARCH}/cpu_avx" ++echo "Building AVX CPU" ++build ++compress ++ ++init_vars ++CMAKE_DEFS="${COMMON_CPU_DEFS} -DLLAMA_AVX=on -DLLAMA_AVX2=on -DLLAMA_AVX512=off -DLLAMA_FMA=on -DLLAMA_F16C=on ${CMAKE_DEFS}" ++BUILD_DIR="../build/bsd/${ARCH}/cpu_avx2" ++echo "Building AVX2 CPU" ++build ++compress ++ ++init_vars ++CMAKE_DEFS="${COMMON_CPU_DEFS} -DLLAMA_VULKAN=on ${CMAKE_DEFS}" ++BUILD_DIR="../build/bsd/${ARCH}/vulkan" ++echo "Building Vulkan GPU" ++build ++compress + +cleanup +echo "go generate completed. LLM runners: $(cd ${BUILD_DIR}/..; echo *)"