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

write matrix error #6

Closed
jasonyong opened this issue Dec 15, 2020 · 7 comments
Closed

write matrix error #6

jasonyong opened this issue Dec 15, 2020 · 7 comments

Comments

@jasonyong
Copy link

jasonyong commented Dec 15, 2020

hi, seems there exists an error in write matrix, when I run tests/test-write-matrix.py, it gives me such error:

Traceback (most recent call last):
File "test-write-matrix.py", line 12, in
writer.Write("test", pkwrap.kaldi.matrix.TensorToKaldiMatrix(x))
TypeError: Write(): incompatible function arguments. The following argument types are supported:
1. (self: _pkwrap.kaldi.matrix.BaseFloatMatrixWriter, arg0: str, arg1: kaldi::MatrixBase) -> None

Invoked with: <_pkwrap.kaldi.matrix.BaseFloatMatrixWriter object at 0x7f56c4ce71f0>, 'test', <_pkwrap.kaldi.matrix.Matrix object at 0x7f56c4ce7308>

Can you figure out what happend?

@mrsrikanth
Copy link
Contributor

Hi,

Can you which pytorch and kaldi versions you are using? Are also compiling kaldi with MKL?

@jasonyong
Copy link
Author

pytorch1.6+cuda9.2
kaldi version is d79c896
Compile kaldi with ATLAS

@mrsrikanth
Copy link
Contributor

You have to use kaldi version 6f329a62. Usually, this problem arises in version later than the version given in README.

@karaf
Copy link

karaf commented Feb 9, 2021

Hi, the kaldi version 6f329a62 unfortunately do not support cuda 11.2. and latest Kaldi fail with the error above. Is there any other option to compile pkwrap with cuda 11.2

@mrsrikanth
Copy link
Contributor

Hello,

While I don't have the resources to test compilation with cuda 11.2, I can perhaps try compatibility with the latest Kaldi that supports 11.2. I created a new issue to follow-up: #9

@karaf
Copy link

karaf commented Feb 9, 2021

Great, thanks, I will let you know if it works

@mrsrikanth
Copy link
Contributor

I patched pwkrap (it turned out to be pretty simple change) to be compatible with recent Kaldi version. This error should not appear from again.

It was mainly because at some point BaseFloatMatrixWriter was changed to use MatrixBase (from Matrix), which pybind11 doesn't seem to like. At the moment, I have created a local typedef to undo this patch.

This error should no longer appear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants