Skip to content

[sm6.10] coopvec input vec type convert #8344

@xiaolin-ji

Description

@xiaolin-ji

Description
There is a simple convert from f16 to fp8 for input vec, however, the dxil looks incorrect.
hlsl:
typedef vector<half, 16> half16;
half16 srcF16 = inbuf.Load(0);
InterpretedVector<uint, 4, ComponentEnum::F8_E4M3FN> converted =
Convert<ComponentEnum::F8_E4M3FN, ComponentEnum::F16>(srcF16);

dxil:
%4 = call %dx.types.ResRet.v16f16 @dx.op.rawBufferVectorLoad.v16f16(i32 303, %dx.types.Handle %3, i32 0, i32 undef, i32 2) ; RawBufferVectorLoad(buf,index,elementOffset,alignment)
%5 = extractvalue %dx.types.ResRet.v16f16 %4, 0
%6 = shufflevector <16 x half> %5, <16 x half> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
%7 = call <4 x i32> @dx.op.linAlgConvert.v4i32.v4f16(i32 -2147483618, <4 x half> %6, i32 8, i32 21) ; LinAlgConvert(inputVector,inputInterpretation,outputInterpretation)

we expected <16 x half> %5 as the convert input, but it shufflevector to <4xhalf> which is not expected.

Is there something wrong from this hlsl or dxc problem

Steps to Reproduce

Actual Behavior

Environment

  • DXC version
  • Host Operating System <!--- Host operating system and version --->

Metadata

Metadata

Assignees

Labels

bugBug, regression, crashneeds-triageAwaiting triage

Type

No type

Projects

Status

Triaged

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions