This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Pytorch with APL

Hello, 

I am trying to build and use Pytorch with APL on Windows. The build seems successful, but I get errors such as: 

  1. On entry to SGEMM  parameter number 10 had an illegal value
  2. On entry to DGEMM  parameter number 13 had an illegal value

Can you help us identify the problem? Can it be a problem with the build or is it an APL bug? 

Parents
  • Hi Irem,

    Normally errors like this mean that you've linked against a library using the wrong integer size.  Most programs default to using 32-bit integers ('int' in C) but some choose to use 64-bit integers ('long long' in C).  The BLAS interface was defined at a time when Fortran was the main language and this choice was a compile-time option.  As such libraries like ArmPL have to provide both.

    Probably what you want to do is to ensure you're linked against the 32-bit version, i.e. a version with "lp64" in its name, not "ilp64".  For example, if you want the non-threaded version this should be armpl_lp64_mp (as in -larmpl_lp64_mp).

    An example of this linking stage with the MSVC compiler is:

            cl /MD example.obj /Feexample.exe %ARMPL_DIR%\lib\armpl_lp64.lib  %ARMPL_DIR%\lib\FortranRuntime.lib %ARMPL_DIR%\lib\FortranDecimal.lib

    Hope this helps.  Do let us know if that doesn't work. 

    Chris

Reply
  • Hi Irem,

    Normally errors like this mean that you've linked against a library using the wrong integer size.  Most programs default to using 32-bit integers ('int' in C) but some choose to use 64-bit integers ('long long' in C).  The BLAS interface was defined at a time when Fortran was the main language and this choice was a compile-time option.  As such libraries like ArmPL have to provide both.

    Probably what you want to do is to ensure you're linked against the 32-bit version, i.e. a version with "lp64" in its name, not "ilp64".  For example, if you want the non-threaded version this should be armpl_lp64_mp (as in -larmpl_lp64_mp).

    An example of this linking stage with the MSVC compiler is:

            cl /MD example.obj /Feexample.exe %ARMPL_DIR%\lib\armpl_lp64.lib  %ARMPL_DIR%\lib\FortranRuntime.lib %ARMPL_DIR%\lib\FortranDecimal.lib

    Hope this helps.  Do let us know if that doesn't work. 

    Chris

Children