pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: BLAS: Does cblas interface work with BLAS types other than netlib



On Sun, Sep 25, 2022 at 06:40:47PM +0530, Mayuresh wrote:
> On Sun, Sep 25, 2022 at 05:10:42PM +0530, Mayuresh wrote:
> > > The other BLAS build should include cblas wrappers.
> > 
> > Ok. Will take a closer look.
> 
> Yes, indeed those are there, were just masked. Please confirm if the
> following patch is required:
> 
>     diff --git a/mk/blas.buildlink3.mk b/mk/blas.buildlink3.mk
>     index 87cd4ba00..bfca59c7b 100644
>     --- a/mk/blas.buildlink3.mk
>     +++ b/mk/blas.buildlink3.mk
>     @@ -156,7 +156,7 @@ BLAS_LIBS=  -lopenblas${_BLAS_64}_pthread
>      LAPACK_LIBS=   ${BLAS_LIBS}
>      CBLAS_LIBS=    ${BLAS_LIBS}
>      LAPACKE_LIBS=  ${BLAS_LIBS}
>     -BLAS_INCLUDES= -I${PREFIX}/include/openblas64_pthread
>     +BLAS_INCLUDES= -I${PREFIX}/include/openblas${_BLAS_64}_pthread
>      BLAS_PC=       openblas${_BLAS_64}_pthread
>      LAPACK_PC=     ${BLAS_PC}
>      CBLAS_PC=      ${BLAS_PC}
> 
> 
> I am able to build dlib-cpp with this change.

[Somehow the above email has not appeared on the list.]

Now I am able to compile and link either _pthread or _openmp variant of
openblas against my application, it doesn't look like dlib is benefiting
from it. I have tried setting env var OMP_NUM_THREADS with openmp version,
as well as tried calling openblas_set_num_threads.

Perhaps it requires digging into dlib's code. Any other quick tips will be
helpful.

-- 
Mayuresh


Home | Main Index | Thread Index | Old Index