I'd like to share some issues (with fixes) that I discovered while trying to use your package:
A bug in spnlib/spn/src/generic/SoftProposalGenerator.cu, SP_InitDistanceMetric(...):
const uint16 count = N * N;
should be
const uint32 count = (uint32)N * (uint32)N;
Otherwise there's an integer overflow for tensors that have H*W > 1024 (this is pretty restrictive, even 32x32 overflows)
(these of course aren't affecting the normal float code path, but still potentially a bug) Double implementations are currently useless, since the GEMV function consumes only float pointers:
.../SPN.pytorch/spnlib/spn/src/generic/SoftProposalGenerator.cu: In function ‘cuspn_Double_SP_Generate’:
.../SPN.pytorch/spnlib/spn/src/generic/SoftProposalGenerator.cu:107:17: warning: passing argument 6 of ‘THCudaBlas_Sgemv’ from incompatible pointer
type [-Wincompatible-pointer-types]
transferMatrix_data,
^
(I am building by directly calling python build.py in make.sh instead of python setup.py install). Without these build.py fixes I had various compiler / build_extension "File not found" errors:
I'd like to share some issues (with fixes) that I discovered while trying to use your package:
A bug in
spnlib/spn/src/generic/SoftProposalGenerator.cu
,SP_InitDistanceMetric(...)
:const uint16 count = N * N;
should be
const uint32 count = (uint32)N * (uint32)N;
Otherwise there's an integer overflow for tensors that have H*W > 1024 (this is pretty restrictive, even 32x32 overflows)
(these of course aren't affecting the normal float code path, but still potentially a bug) Double implementations are currently useless, since the GEMV function consumes only float pointers:
(I am building by directly calling
python build.py
inmake.sh
instead ofpython setup.py install
). Without thesebuild.py
fixes I had various compiler / build_extension "File not found" errors: