diff --git a/src/Interface/KrnlGlobalOpInterface.td b/src/Interface/KrnlGlobalOpInterface.td index f680118366..394c4f0605 100644 --- a/src/Interface/KrnlGlobalOpInterface.td +++ b/src/Interface/KrnlGlobalOpInterface.td @@ -20,20 +20,30 @@ include "mlir/IR/OpBase.td" def KrnlGlobalOpInterface : OpInterface<"KrnlGlobalOpInterface"> { let description = [{ + A KrnlGlobalOp-like operation is one that holds global constant value. It has + `name` attribute, `shape` attribute, `offset` attribute, and `alighnment` + attribute. Its content is stored in the `value` attribute, which can be + converted when retrieving. }]; let methods = [ - InterfaceMethod<"Get the buffer for the constant value from value attribute. ", + InterfaceMethod<"Get the buffer for the constant value from value attribute. " + "If conversions are required to get the buffer. It should be " + "done in this method. The constant value is stored in newly " + "allocated buffer. The buffer needs to be freed afte use by " + "using `freeBuffer()`.", "::mlir::ArrayRef", "getBuffer", (ins ) >, - InterfaceMethod<"Get the size of the buffer for the constant value.", + InterfaceMethod<"Get the size of the buffer. ", "uint64_t", "getBufferSize", (ins ) >, InterfaceMethod<"Free the buffer for the constant value retrieved from value " "attribute.", "void", "freeBuffer", (ins "::mlir::ArrayRef": $buffer) >, - InterfaceMethod<"Update the `value` attribute.", + InterfaceMethod<"Update the `value` attribute by converting existing `value` " + "attribute. Assume to use getBuffer(), setValueAttr(), and " + "freeBuffer() in this function.", "void", "updateValueAttr", (ins ) >, InterfaceMethod<"Get the value from the attribute.",