onnxruntime/cmake/external/abseil-cpp.natvis
Dmitri Smirnov cc542024ce
Create edges with arg positons correctly accounting for non-existing args (#18462)
### Description
Truncate traling non-existing arguments.
  Make sure we do not skip on the non-existing arguments in the middle,
  because shape inferece relies on their proper position.
This also affects the argument position in the Edges that must be
properly rebuilt
  each time If node branch is inlined.
Make sure that when we rename Defs in subgraphs, new renamed defs are
created in those subgraphs
  instead of pointing to outer scope defs.
  Add unit test.

### Motivation and Context
This is a follow up for
https://github.com/microsoft/onnxruntime/pull/18105
Currently, the non-trailing arguments are simply ignored and the edges
are created
with potentially incorrect positions.
2023-11-20 14:49:09 -08:00

79 lines
3.8 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<AutoVisualizer xmlns="http://schemas.microsoft.com/vstudio/debugger/natvis/2010">
<Type Name="absl::lts_20230802::InlinedVector&lt;*&gt;">
<Intrinsic Name="_size" Expression="storage_.metadata_.value >> 1"/>
<Intrinsic Name="_is_allocated" Expression="(storage_.metadata_.value &amp; 1) == 1"/>
<Intrinsic Name="_inlined_data" Expression="($T1*)storage_.data_.inlined.inlined_data"/>
<Intrinsic Name="_allocated_data" Expression="storage_.data_.allocated.allocated_data"/>
<DisplayString>{{ size={ _size() }}}</DisplayString>
<Expand>
<Item Name="[capacity]" ExcludeView="simple" Condition="!_is_allocated()">$T2</Item>
<Item Name="[capacity]" ExcludeView="simple" Condition="_is_allocated()">storage_.data_.allocated.allocated_capacity</Item>
<Item Name="[N]" ExcludeView="simple">$T2</Item>
<Item Name="[size]" ExcludeView="simple">_size()</Item>
<Item Name="[is_allocated]" ExcludeView="simple">_is_allocated()</Item>
<Item Name="[allocator]" ExcludeView="simple" Condition="_is_allocated()">storage_.metadata_</Item>
<IndexListItems Condition="!_is_allocated()">
<Size>_size()</Size>
<ValueNode>_inlined_data()[$i]</ValueNode>
</IndexListItems>
<IndexListItems Condition="_is_allocated()">
<Size>_size()</Size>
<ValueNode>_allocated_data()[$i]</ValueNode>
</IndexListItems>
</Expand>
</Type>
<!-- Should handle both flat hash_set and hash_map -->
<Type Name="absl::lts_20230802::container_internal::raw_hash_set&lt;*&gt;">
<Intrinsic Name="_commonfields" Expression="settings_.value"/>
<Intrinsic Name="_size" Expression="settings_.value.compressed_tuple_.value"/>
<Intrinsic Name="_capacity" Expression="_commonfields().capacity_"/>
<Intrinsic Name="_control" Expression="_commonfields().control_"/>
<Intrinsic Name="_slots" Expression="(slot_type*)(_commonfields().slots_)"/>
<DisplayString IncludeView="noparens">size={ _size() }</DisplayString>
<DisplayString ExcludeView="noparens">size=({_size()})</DisplayString>
<Expand>
<Item Name="[Size]">_size()</Item>
<Item Name="[Capacity]" ExcludeView="noparens">_capacity()</Item>
<CustomListItems MaxItemsPerView="100">
<Variable Name="nslot" InitialValue="0" />
<Size>_size()</Size>
<Loop>
<!-- bool IsFull(ctrl_t c) const { return c >= 0; } -->
<If Condition="_control()[nslot] &gt;= 0">
<Item>_slots()[nslot]</Item>
</If>
<Exec>nslot++</Exec>
<Break Condition="nslot == _capacity()" />
</Loop>
</CustomListItems>
</Expand>
</Type>
<!-- Primitive types stored as a value -->
<Type Name="absl::lts_20230802::container_internal::Storage&lt;*,*,0&gt;">
<DisplayString IncludeView="noparens">*($T1 *){value}</DisplayString>
<DisplayString ExcludeView="noparens">(*($T1 *){value})</DisplayString>
<Expand>
<ExpandedItem>*($T1 *){value}</ExpandedItem>
</Expand>
</Type>
<!-- For storage inherited from the type -->
<Type Name="absl::lts_20230802::container_internal::Storage&lt;*,*,1&gt;">
<DisplayString IncludeView="noparens">*($T1 *)this</DisplayString>
<DisplayString ExcludeView="noparens">(*($T1 *)this)</DisplayString>
<Expand>
<ExpandedItem>*($T1 *)this</ExpandedItem>
</Expand>
</Type>
<Type Name="absl::lts_20230802::container_internal::map_slot_type&lt;*&gt;">
<DisplayString IncludeView="noparens">{value.first}, {value.second}</DisplayString>
<DisplayString ExcludeView="noparens">({value.first}, {value.second})</DisplayString>
<Expand>
<Item Name="first" ExcludeView="simple">value.first</Item>
<Item Name="second" ExcludeView="simple">value.second</Item>
</Expand>
</Type>
</AutoVisualizer>