Skip to content

Matrix factorization should work in x86 #1441

@artidoro

Description

@artidoro

Matrix factorization fails in x86 (MatrixFactorizationSimpleTrainAndPredict test was disabled as part of #1432).

The reason is that the MFModel struct is architecture dependent:

[StructLayout(LayoutKind.Explicit)]
private unsafe struct MFModel
{
[FieldOffset(0)]
public int M;
[FieldOffset(4)]
public int N;
[FieldOffset(8)]
public int K;
[FieldOffset(16)]
public float* P;
[FieldOffset(24)]
public float* Q;
}

The struct matches the output data structure produced by c++ code in the libmf library.

See the following comment for how this issue should be solved using P/Invoke instead: #1432 (comment)

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions