MCPcopy Index your code
hub / github.com/apache/tvm / with_diag_source

Method with_diag_source

python/tvm/script/parser/core/parser.py:479–499  ·  view source on GitHub ↗

Add a new source as with statement. Parameters ---------- source : Source The source for diagnostics. Returns ------- res : Any The context with new source.

(self, source: Source)

Source from the content-addressed store, hash-verified

477 return self.base_py_module_context
478
479 def with_diag_source(self, source: Source):
480 """Add a new source as with statement.
481
482 Parameters
483 ----------
484 source : Source
485 The source for diagnostics.
486
487 Returns
488 -------
489 res : Any
490 The context with new source.
491 """
492
493 last_diag = self.diag
494 self.diag = Diagnostics(source)
495
496 def pop_source():
497 self.diag = last_diag
498
499 return _deferred(pop_source)
500
501 def eval_expr(
502 self,

Callers 2

__call__Method · 0.80
__call__Method · 0.80

Calls 2

DiagnosticsClass · 0.85
_deferredFunction · 0.85

Tested by

no test coverage detected