I am trying to run a code on CPU. However, I am getting the following error:
<code>ERROR: UndefVarError: `synchronize` not defined
</code>
<code>ERROR: UndefVarError: `synchronize` not defined
</code>
ERROR: UndefVarError: `synchronize` not defined
It says that the function “synchronize_if_gpu” is not defined in the file. However, it is clearly defined:
<code>synchronize_if_gpu() = has_cuda() ? CUDA.synchronize() : nothing
</code>
<code>synchronize_if_gpu() = has_cuda() ? CUDA.synchronize() : nothing
</code>
synchronize_if_gpu() = has_cuda() ? CUDA.synchronize() : nothing
Why is this happening?