You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The axpy test checks that the return value of axpy is the same as the return value of nblas.daxpy. These functions actually have return type void so the check is just that undefined === undefined!
The actual thing saxpy/daxpyshould do is mutate y in place.
Note this might have been at least partly obscured by TypeScript itself. Changing the dynamic require('nblas') to a static import import * as nblas from 'nblas' causes a number of typescript warnings in blas.ts to surface. Notably, blas.ts does not seem to check whether the TypedArrays match the provided dtype (or are even the same type, for multi-argument functions), which I think could lead to a runtime segfault.
It's a result of having the nblas module optional. When I implemented the try..catch-require, it made typescript typing impossible because the nblas types (https://github.com/nperf/nblas/blob/master/src/types.ts) are not there because the package is not installed. Maybe there is a modern solution for this?
The
axpy
test checks that the return value ofaxpy
is the same as the return value ofnblas.daxpy
. These functions actually have return typevoid
so the check is just thatundefined === undefined
!The actual thing
saxpy
/daxpy
should do is mutatey
in place.vectorious/src/blas.spec.ts
Line 17 in 3ec2561
The text was updated successfully, but these errors were encountered: