Repository navigation
Print input/output values for each dispatch function in DEBUG mode - #2605
Conversation
| Trace point for dispatchable functions. | ||
| }]; | ||
|
|
||
| let arguments = (ins Variadic<AnyType>:$operands); |
There was a problem hiding this comment.
you can change this to Variadic<FLOW_Tensor>
| return failure(); | ||
| } | ||
|
|
||
| #ifndef NDEBUG |
There was a problem hiding this comment.
it's worth making this a runtime flag - like iree-flow-trace-dispatch-tensors - so that this is possible to enable from python/etc without recompiling
There was a problem hiding this comment.
Done. Yeah, it's easier to use if make it a runtime flag.
| } | ||
|
|
||
| #ifndef NDEBUG | ||
| builder.create<TensorTraceOp>(regionOp.getLoc(), newArgs); |
There was a problem hiding this comment.
since this just traces tensors you'll want to filter newArgs/dispatchOp.getResults() below for just things of TensorType
| Location loc = traceOp.getLoc(); | ||
| SmallVector<Value, 4> bufferViews; | ||
| for (auto operand : llvm::enumerate(rawOperands)) { | ||
| if (!IREE::HAL::TensorRewriteAdaptor::isValidNewType( |
There was a problem hiding this comment.
can remove this check if the arguments are filtered to just tensors above
| SymbolTable &importSymbols, | ||
| TypeConverter &typeConverter, | ||
| OwningRewritePatternList &patterns) { | ||
| patterns.insert<VMImportOpConversion<IREE::HAL::BufferViewTraceOp>>( |
There was a problem hiding this comment.
nit: move to bottom so this order matches the order in the HALOps.td
There was a problem hiding this comment.
Oh, missed this during cleanup. Done.
Fixes #2305