mirror of
https://github.com/luxfi/accel.git
synced 2026-10-30 17:03:45 +00:00
The lux_hqc_native opt-in tag made native HQC off-by-default, so plain 'go build' silently shipped the stub and HQC needed -tags to work. That was the wrong call. Native is now THE default cgo path (code_cpu.go, //go:build cgo) linking libluxgpu_hqc from the installed lux-gpu keg; only CGO_ENABLED=0 (code_nocgo.go) uses the stub. No tag needed. Verified: CGO=1 go build/test/bench ./ops/code/ runs native HQC with zero tags (lux-gpu installed at /opt/homebrew/opt/lux-gpu); CGO=0 still compiles the stub. Full accel suite green (7/7, no tags). Co-authored-by: Hanzo Dev <[email protected]>
27 lines
910 B
Go
27 lines
910 B
Go
// Copyright (C) 2024-2026, Lux Industries Inc. All rights reserved.
|
|
// See the file LICENSE for licensing terms.
|
|
|
|
//go:build cgo && lux_gpu_pkgconfig
|
|
|
|
// Optional pkg-config-driven link surface for the lux-gpu substrate.
|
|
// Enable with `-tags=lux_gpu_pkgconfig` when you want a hard failure
|
|
// if `pkg-config lux-gpu` doesn't resolve, instead of falling back to
|
|
// the multi-prefix probe in code_cpu.go. Mostly useful in CI / build
|
|
// systems that have already installed lux-gpu via `cmake --install`
|
|
// and want to assert the install is wired up.
|
|
//
|
|
// The default build (no tag) still works without pkg-config — it
|
|
// probes every standard install prefix in code_cpu.go's CGO directives.
|
|
//
|
|
// To target a non-system install prefix from pkg-config:
|
|
//
|
|
// PKG_CONFIG_PATH=$HOME/.local/lib/pkgconfig \
|
|
// go build -tags=lux_gpu_pkgconfig ./...
|
|
|
|
package code
|
|
|
|
/*
|
|
#cgo pkg-config: lux-gpu
|
|
*/
|
|
import "C"
|