Closed antonysigma closed 1 year ago
@antonysigma I sent you an invite to have more permissions for this repo.
@antonysigma I sent you an invite to have more permissions for this repo.
@SteveDiamond Thank you for inviting me as the contributing member. Shall I self approve pull requests?
Also, am I supposed to add my name to the MIT license to strengthen the legal protection?
You can self-approve pull requests.
Assert these criteria only when
implem == 'halide'
: For output buffers of all Prox functions, ensure they are in single-precision (float32) datatype, arranged in the Fortran-style order.This resolves a bug: (L-)ADMM fails to converge when we explicitly define
proxL1(..., implem='halide')
in the problem. Previously, the Python interfacePybind11
dynamically casts the output Numpy buffers fromfloat64
to a temporary buffer as typefloat32
, calls Halide-accelerated pipeline, then immediately destroys the temp buffer.Create a new test case
proximal.tests.test_halide.TestHalideOps._test_algos
to ensure algorithm convergence when Halide-accelerated Prox functions are specified in the problem.Similarly, ensure all input buffers are in single-precision datatype in Fortran-style order.
Rationale: Halide-acceleration of the Prox functions are only justified when we can avoid the explicit memory copy and type casting. Otherwise, the Halide implementation can run slower than the native Numpy/Numexpr implementation.
Related to #67 .