Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Kotlin/Native] Matrix slicing and vector for Float multiplication resulting in incorrect output #192

Closed
devcrocod opened this issue Jan 25, 2024 · 0 comments
Assignees
Labels
bug Something isn't working native An issue/PR related to Native
Milestone

Comments

@devcrocod
Copy link
Collaborator

devcrocod commented Jan 25, 2024

Reproduce

  1. Slice a float matrix to a specific dimension
  2. Multiply the sliced matrix with a float vector
  3. Observe the output

Expected result:

[0.8327111, 0.9002757, 0.8499361]

Actual result:

[0.0, 0.0, 0.0]

Code to reproduce

        val (matrix, vector) = data.getFloatMV(5)
        val expected = NativeLinAlg.dot(matrix[2 until 5, 0 until 3].deepCopy(), vector[(0 until 5)..2].deepCopy())
        val actual = NativeLinAlg.dot(matrix[2 until 5, 0 until 3], vector[(0 until 5)..2])
        assertFloatingNDArray(expected, actual)
@devcrocod devcrocod added bug Something isn't working native An issue/PR related to Native labels Jan 25, 2024
@devcrocod devcrocod added this to the 0.3.0 milestone Jan 25, 2024
@devcrocod devcrocod self-assigned this Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working native An issue/PR related to Native
Projects
None yet
Development

No branches or pull requests

1 participant