Skip to content

[HLSL] Miscompilation of ElementWise_Identity.* DML shaders directly cause 37 operator test failures #162178

@Icohedron

Description

@Icohedron

37 DML operator test failures consistent across devices with AMD, NVIDIA, and Intel GPUs are confirmed to be caused by the following shaders:

ElementWise_Identity_256_Strided4D_uint64_emulated
ElementWise_Identity_256_Strided8D_uint64_emulated
ElementWise_Identity_256_Strided4D_uint32_native
ElementWise_Identity_256_Packed4D_uint32_native
ElementWise_Identity_256_Strided4D_uint8_typed32
ElementWise_Identity_256_Packed4D_uint8_typed32

Random sample of failing tests

OperatorTests::ReduceMultiplySumL1SumSquareMultiDims#metadataSet3#220
OperatorTests::CumulativeOperation#409
OperatorTests::ReduceMultiplySumL1SumSquareMultiDims#metadataSet0#335
OperatorTests::ReduceMultiplySumL1SumSquareMultiDims#metadataSet3#204
OperatorTests::CumulativeOperation#145
OperatorTests::ReduceMultiplySumL1SumSquareMultiDims#metadataSet3#226
OperatorTests::CumulativeOperation#101
OperatorTests::CumulativeOperation#310
OperatorTests::MatrixMultiplyIntegerToFloatLargeGemm#211 
OperatorTests::ReverseSubsequences#272

Sample Reproduction

> ./TE.exe DirectML.Test.OperatorTests.dll /name:"OperatorTests::MatrixMultiplyIntegerToFloatLargeGemm#211" /p:DisableMetacommands=1 /logOutput:low
Test Authoring and Execution Framework v10.72 for x64

StartGroup: OperatorTests::MatrixMultiplyIntegerToFloatLargeGemm#211
Error: Output Tensor #0:
Error: Tensor Sizes: 32,1
Error: Tensor Data Type: float16
Error: Index: 0008 @00000008 [8,0].  Ref: 23.6250000000 (0x4DE8).  DML: 0.3596191406 (0x35C1).  Abs: 23.265381.  Rel: 98.477803%.  Ulp: 6183
Error: Index: 0009 @00000009 [9,0].  Ref: 43.1875000000 (0x5166).  DML: 0.5463867188 (0x385F).  Abs: 42.641113.  Rel: 98.734850%.  Ulp: 6407
Error: Index: 0010 @00000010 [10,0].  Ref: 25.5156250000 (0x4E61).  DML: -inf (0xFC00).  Abs: inf.  Rel: -nan(ind)%.  Ulp: 21089
Error: Index: 0011 @00000011 [11,0].  Ref: 13.8906250000 (0x4AF2).  DML: 0.2192382812 (0x3304).  Abs: 13.671387.  Rel: 98.421682%.  Ulp: 6126
Error: Index: 0012 @00000012 [12,0].  Ref: 35.6562500000 (0x5075).  DML: -inf (0xFC00).  Abs: inf.  Rel: -nan(ind)%.  Ulp: 21621
Error: Index: 0013 @00000013 [13,0].  Ref: 32.2812500000 (0x5009).  DML: -inf (0xFC00).  Abs: inf.  Rel: -nan(ind)%.  Ulp: 21513
Error: Index: 0014 @00000014 [14,0].  Ref: 1.6162109375 (0x3E77).  DML: -18.8125000000 (0xCCB4).  Abs: 20.428711.  Rel: 108.591154%.  Ulp: 29123
Error: Index: 0015 @00000015 [15,0].  Ref: 18.5937500000 (0x4CA6).  DML: 0.9057617188 (0x3B3F).  Abs: 17.687988.  Rel: 95.128676%.  Ulp: 4455
Error: Index: 0016 @00000016 [16,0].  Ref: 19.2343750000 (0x4CCF).  DML: -0.6069335938 (0xB8DB).  Abs: 19.841309.  Rel: 103.155463%.  Ulp: 37876
Error: 21 / 32 (65.625000%) of elements were found to be above tolerance.
Error: Max absolute delta: inf.  Allowed absolute tolerance: 0.020000.
Error: Max relative delta: 127.136432%.  Allowed relative tolerance: 1.000000%.
Error: Max ULP delta: 37876.  Allowed tolerance: 6 ULPs (float16).
Error: Verify: Fail [File: C:\workspace\DirectML\SharedToolingLib\External\Test\TaefHelper\TaefHelper.cpp, Function: TaefHelper::Fail, Line: 133]
EndGroup: OperatorTests::MatrixMultiplyIntegerToFloatLargeGemm#211 [Failed]

Summary of Non-passing Tests:
    OperatorTests::MatrixMultiplyIntegerToFloatLargeGemm#211 [Failed]

Summary: Total=1, Passed=0, Failed=1, Blocked=0, Not Run=0, Skipped=0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Closed

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions