@@ -168,12 +168,12 @@ def replace_quantized_partition_with_op(
168
168
# TODO - style: use templated types
169
169
class DelegateMappingBuilder :
170
170
"""
171
- Profiling helper class for building Delegate Maps .
172
- Delegate Maps are a mapping from log entry identifiers to node
171
+ Profiling helper class for building Delegate Mappings .
172
+ Delegate Mappings are mappings from delegate debug identifiers to node
173
173
debug handles. Specifically this is used to log within backend delegates
174
174
175
175
Args:
176
- generated_identifiers (bool, optional): Whether delegate map keys are
176
+ generated_identifiers (bool, optional): Whether identifier keys are
177
177
generated automatically. Defaults to False.
178
178
"""
179
179
@@ -206,27 +206,23 @@ def insert_delegate_mapping_entry(
206
206
identifier : Optional [Union [int , str ]] = None ,
207
207
) -> Union [int , str ]:
208
208
"""
209
- Add or append to an existing delegate mapping entry
209
+ Add a new delegate mapping entry
210
210
211
211
If self._generated_identifiers = False:
212
- - An identifier must be provided, else this is no-op
212
+ - A new identifier must be provided, else an exception is thrown
213
213
214
214
If self._generated_identifiers = True:
215
- - NEW identifiers cannot be manually provided. Existing identifier
216
- can be provided
217
215
- New identifiers are generated incrementally, 0 indexed
218
-
219
- If a provided identifier already exists, node entries are appended
216
+ - Identifiers cannot be manually provided, else an exception is thrown
220
217
221
218
Args:
222
219
nodes (Union[Node, List[Node]]): A (list of) Node(s)
223
220
identifier (Optional[Union[int, str]]):
224
221
Debug identifier corresponding to the Node(s)
225
222
226
223
Returns:
227
- Optional[Union[int, str]]:
228
- Delegate debug identifier corresponding to the node group
229
- None is returned, if no identifier is associated
224
+ Union[int, str]:
225
+ Delegate debug identifier inserted
230
226
"""
231
227
232
228
# Check for manual addition of identifier (with generated identifiers enabled)
0 commit comments