CHIP-SPV / chipStar

chipStar is a tool for compiling and running HIP/CUDA on SPIR-V via OpenCL or Level Zero APIs.
Other
182 stars 29 forks source link

[RC4] Texture tests fail on OpenCL #757

Closed pjaaskel closed 7 months ago

pjaaskel commented 7 months ago

These (according to the test log) worked in RC3. Fail on Intel OpenCL CPU and the iGPU (OpenCL).

    787 - Unit_hipTextureFetch_vector (Failed)
    788 - Unit_hipTextureObj2D_Check (Failed)
    790 - Unit_hipTexObjPitch_texture2D - float (Failed)
    791 - Unit_hipTexObjPitch_texture2D - int (Failed)
    792 - Unit_hipTexObjPitch_texture2D - unsigned char (Failed)
    793 - Unit_hipTexObjPitch_texture2D - int16_t (Failed)
    794 - Unit_hipTexObjPitch_texture2D - char (Failed)
    795 - Unit_hipTexObjPitch_texture2D - unsigned int (Failed)
    796 - Unit_hipCreateTextureObject_tex1DfetchVerification (Failed)
    797 - Unit_tex1Dfetch_CheckModes (Failed)
    798 - Unit_hipTextureObj1DCheckModes (Failed)
    799 - Unit_hipTextureObj2DCheckModes (Failed)
pjaaskel commented 7 months ago

Yep, fails with RC3 too now (although in the RC3 test log it has marked passed). So, must be something's changed in my system since testing RC3. Investigating...

/home/pjaaskel/src/chipstar-testing/chipStar-1.1-RC3/HIP/tests/catch/unit/texture/hipTextureObj2DCheckModes.cc:74: FAILED:
  REQUIRE( false )
with message:
  Error: hipErrorTbd
      Code: 1054
      Str: hipCreateTextureObject(&textureObject, &resDesc, &texDesc, NULL)
      In File: /home/pjaaskel/src/chipstar-testing/chipStar-1.1-RC3/HIP/tests/
  catch/unit/texture/hipTextureObj2DCheckModes.cc
      At line: 74

CHIP error [TID 183952] [1705501099.423117806] : hipErrorTbd (CL_INVALID_OPERATION ) in /home/pjaaskel/src/chipstar-testing/chipStar-1.1-RC3/src/backend/OpenCL/CHIPBackendOpenCL.cc:196:createImage

CHIP error [TID 183952] [1705501099.423126857] : Caught Error: hipErrorTbd
pjaaskel commented 7 months ago

Yep. I had built my PoCL on Monday with the conformance on since I was tweaking CTS and forgot. In the conformance mode all texture types are not supported (as they are not yet conformant). Disabling the CTS mode fixed this problem.

franz commented 7 months ago

.... than explains the PoCL failure but not the iGPU failure. For iGPU, the problem is the CHIP_USE_INTEL_USM setting. I'll create a workaround in cmake/UnitTests.cmake

pjaaskel commented 7 months ago

So, it gets enabled by default and it has the texture part not supported since the USM allocations do not support textures?

franz commented 7 months ago

No, it's disabled by default, so this is not a regression.

pjaaskel commented 7 months ago

...so it works with the default CMake options and you just had it explicitly enabled in your tests? OK.