You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some tools produce unsigned values that use only one or two bites but L0 specification does not have that resolution on the union for results. Therefore, the proposal is to extend zet_value_t to support them. Note that zet_value_type_t already supports ZET_VALUE_TYPE_UINT8 and ZET_VALUE_TYPE_UINT16
switch( data.type )
{
case ZET_VALUE_TYPE_UINT8:
printf(" Value: %u", data.value.ui8 );
break;
case ZET_VALUE_TYPE_UINT16:
printf(" Value: %u", data.value.ui16 );
break;
case ZET_VALUE_TYPE_UINT32:
printf(" Value: %un", data.value.ui32 );
break;
case ZET_VALUE_TYPE_UINT64:
printf(" Value: %llun", data.value.ui64 );
break;
case ZET_VALUE_TYPE_FLOAT32:
printf(" Value: %fn", data.value.fp32 );
break;
case ZET_VALUE_TYPE_FLOAT64:
printf(" Value: %fn", data.value.fp64 );
break;
case ZET_VALUE_TYPE_BOOL8:
if( data.value.ui32 )
printf(" Value: true\n" );
elseprintf(" Value: false\n" );
break;
default:
break;
};
The text was updated successfully, but these errors were encountered:
wdamon-intel
changed the title
extend zet_value_t to support uint8_t u8; uint16_t u16;
extend zet_value_t to support unsigned 8- and 16- bit integer types
Mar 11, 2024
Summary
Some tools produce unsigned values that use only one or two bites but L0 specification does not have that resolution on the union for results. Therefore, the proposal is to extend zet_value_t to support them. Note that zet_value_type_t already supports ZET_VALUE_TYPE_UINT8 and ZET_VALUE_TYPE_UINT16
https://spec.oneapi.io/level-zero/latest/tools/api.html#_CPPv411zet_value_t
https://spec.oneapi.io/level-zero/latest/tools/api.html#_CPPv416zet_value_type_t
Details
Motivation
Support tools that returns one and/or two bites results without casting to bigger result type.
Interoperability with Other APIs
N/A
Proposed APIs
N/A
New Enumerations
Extend zet_value_t
Usage example
extend https://spec.oneapi.io/level-zero/latest/tools/PROG.html#calculation to support uint8_t and uint16_t
The text was updated successfully, but these errors were encountered: