MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / SubstituteTemplate

Function SubstituteTemplate

dnn/scripts/cutlass_generator/library.py:422–433  ·  view source on GitHub ↗
(template, values)

Source from the content-addressed store, hash-verified

420
421#
422def SubstituteTemplate(template, values):
423 text = template
424 changed = True
425 while changed:
426 changed = False
427 for key, value in values.items():
428 regex = "\\$\\{%s\\}" % key
429 newtext = re.sub(regex, value, text)
430 if newtext != text:
431 changed = True
432 text = newtext
433 return text
434
435
436###################################################################################################

Callers 15

extended_nameMethod · 0.85
procedural_nameMethod · 0.85
extended_nameMethod · 0.85
procedural_nameMethod · 0.85
emitMethod · 0.85
emitMethod · 0.85
emitMethod · 0.85
emitMethod · 0.85
emitMethod · 0.85
emitMethod · 0.85
emitMethod · 0.85
emitMethod · 0.85

Calls 2

itemsMethod · 0.80
subMethod · 0.45

Tested by

no test coverage detected