Files
fhe/gpu/fhe_stub.go
T
Zach Kelling 38eaad9d56 refactor(gpu): remove luxgpu build tag, use cgo only
- Remove luxgpu build tag requirement - just cgo is sufficient
- Add ArangeInt and ToSlice generic functions to fhe_ops.go
- Fix ToSlice to use correct C API (lux_gpu_tensor_data takes output buffer)
- Update imports to include unsafe package and string.h header
- Merge unique functions from tfhe_ops_cgo.go into fhe_ops.go

When CGO_ENABLED=1, all lux C++ libs from ~/work/luxcpp are used.
No special tags needed.
2026-01-05 22:08:01 -08:00

17 lines
449 B
Go

//go:build !cgo
// Package gpu provides FHE operations with optional GPU acceleration.
// This file provides stub implementations when CGO is disabled or luxgpu tag is not set.
package gpu
// GPUAvailable returns false when CGO is disabled or luxgpu is not enabled
func GPUAvailable() bool {
return false
}
// GetBackend returns "CPU (pure Go)" when CGO is disabled or luxgpu is not enabled
func GetBackend() string {
return "CPU (pure Go)"
}