File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- //go:build fvm
1+ //go:build !nofvm
22
33package cgo
44
Original file line number Diff line number Diff line change 1- //go:build fvm
1+ //go:build !nofvm
22
33package cgo
44
Original file line number Diff line number Diff line change 1- //go:build cgo && (amd64 || arm64 || riscv64) && fvm
1+ //go:build cgo && (amd64 || arm64 || riscv64) && !nofvm
22// +build cgo
33// +build amd64 arm64 riscv64
4- // +build fvm
4+ // +build !nofvm
55
66package ffi
77
Original file line number Diff line number Diff line change 1- //go:build !fvm
1+ //go:build nofvm
22
33package ffi
44
Original file line number Diff line number Diff line change @@ -218,6 +218,13 @@ build_from_source() {
218218 fi
219219 fi
220220
221+ # Use -no-fvm GPU feature variants when FVM is disabled
222+ if [ -n " ${FFI_DISABLE_FVM} " ] && [ -n " ${gpu_flags} " ]; then
223+ echo " FFI_DISABLE_FVM is set, using no-fvm GPU variant"
224+ gpu_flags=" ${gpu_flags} -no-fvm"
225+ fi
226+ echo " DEBUG: FFI_DISABLE_FVM=${FFI_DISABLE_FVM} gpu_flags=${gpu_flags} "
227+
221228 # Default to use multicore_sdr flags, unless specified to disable
222229 use_multicore_sdr=" multicore-sdr"
223230 if [ " ${FFI_USE_MULTICORE_SDR} " == " 0" ]; then
@@ -237,7 +244,7 @@ build_from_source() {
237244 [ -n " ${use_multicore_sdr} " ] && features+=(" ${use_multicore_sdr} " )
238245
239246 [ -n " ${gpu_flags} " ] && features+=(" ${gpu_flags# ,} " )
240- [ " ${FFI_DISABLE_FVM} " != " 1 " ] && features+=(" fvm" )
247+ [ -z " ${FFI_DISABLE_FVM} " ] && features+=(" fvm" )
241248 [ -n " ${use_fixed_rows_to_discard} " ] && features+=(" ${use_fixed_rows_to_discard# ,} " )
242249 if [ " ${FFI_USE_BLST_PORTABLE} " == " 1" ] || [ " ${FFI_PORTABLE} " == " 1" ]; then
243250 features+=(" blst-portable" )
Original file line number Diff line number Diff line change @@ -87,6 +87,19 @@ opencl = [
8787 " fvm3/opencl" ,
8888 " fvm4/opencl" ,
8989]
90+ # GPU features without FVM (for builds that disable FVM)
91+ cuda-no-fvm = [
92+ " filecoin-proofs-api/cuda" ,
93+ " rust-gpu-tools/cuda" ,
94+ ]
95+ cuda-supraseal-no-fvm = [
96+ " filecoin-proofs-api/cuda-supraseal" ,
97+ " rust-gpu-tools/cuda" ,
98+ ]
99+ opencl-no-fvm = [
100+ " filecoin-proofs-api/opencl" ,
101+ " rust-gpu-tools/opencl" ,
102+ ]
90103multicore-sdr = [" filecoin-proofs-api/multicore-sdr" ]
91104c-headers = [" safer-ffi/headers" ]
92105# This feature enables a fixed number of discarded rows for TreeR. The `FIL_PROOFS_ROWS_TO_DISCARD`
Original file line number Diff line number Diff line change @@ -75,7 +75,7 @@ main() {
7575 # generate filcrypto.h
7676 # Check if FVM is in the build features - if so, include it in header generation
7777 local __header_features=" c-headers"
78- if echo " ${@: 2} " | grep -q " fvm" ; then
78+ if echo " ${@: 2} " | tr ' , ' ' \n ' | grep -qx " fvm" ; then
7979 __header_features=" c-headers,fvm"
8080 fi
8181 RUSTFLAGS=" ${__rust_flags} " HEADER_DIR=" ." \
You can’t perform that action at this time.
0 commit comments