Skip to content

Commit ed08caa

Browse files
authored
Merge pull request #450 from filecoin-project/improved-error-handling
feat: update to the improved error handling in proofs
2 parents 1fb52f0 + 80ff911 commit ed08caa

File tree

8 files changed

+704
-377
lines changed

8 files changed

+704
-377
lines changed

install-filcrypto

Lines changed: 23 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -173,24 +173,34 @@ build_from_source() {
173173
build="build"
174174
fi
175175

176-
# Check if GPU support is disabled.
177-
if [ "${FFI_USE_GPU}" == "0" ]; then
178-
gpu_flags=""
179-
elif [ "${FFI_USE_CUDA_SUPRASEAL}" == "1" ]; then
180-
# If SupraSeal is enabled, just use the `cuda-supraseal` eature and
176+
# Check for specified GPU support.
177+
if [ "${FFI_USE_CUDA_SUPRASEAL}" == "1" ]; then
178+
# If SupraSeal is enabled, just use the `cuda-supraseal` feature and
181179
# nothing else GPU related.
182180
gpu_flags=",cuda-supraseal"
181+
182+
if [ ! "$(command -v nvcc)" ]; then
183+
echo "WARNING: Cannot find nvcc for CUDA support."
184+
echo "WARNING: For CUDA support, please ensure that the CUDA toolkit is properly installed."
185+
echo "WARNING: After installation, nvcc must be in the system path."
186+
echo ""
187+
echo "WARNING: Defaulting to OpenCL GPU support(!!!)"
188+
gpu_flags=",opencl"
189+
fi
183190
else
184-
# If GPUs are enabled and SupraSeal is not, default to CUDA support
185-
# where possible.
186-
# First ensure that nvcc (as part of the CUDA toolkit) is available --
187-
# if it's not warn that we are defaulting GPU to OpenCL instead.
188-
gpu_flags=",cuda"
189-
190-
# Unless OpenCL support is specified or we're building on Darwin.
191-
if [ "${FFI_USE_OPENCL}" == "1" ] || [ "$(uname -s)" = "Darwin" ]; then
191+
# Check if GPU usage is to be disabled.
192+
if [ "${FFI_USE_GPU}" == "0" ]; then
193+
gpu_flags=""
194+
# Check if OpenCL support is specified or we're building on Darwin.
195+
elif [ "${FFI_USE_OPENCL}" == "1" ] || [ "$(uname -s)" = "Darwin" ]; then
192196
gpu_flags=",opencl"
193197
else
198+
# If GPUs are enabled and SupraSeal is not, default to CUDA support
199+
# where possible.
200+
# First ensure that nvcc (as part of the CUDA toolkit) is available --
201+
# if it's not warn that we are defaulting GPU to OpenCL instead.
202+
gpu_flags=",cuda"
203+
194204
if [ ! "$(command -v nvcc)" ]; then
195205
echo "WARNING: Cannot find nvcc for CUDA support."
196206
echo "WARNING: For CUDA support, please ensure that the CUDA toolkit is properly installed."

0 commit comments

Comments
 (0)