-
Notifications
You must be signed in to change notification settings - Fork 59
Closed
Labels
Description
As a follow up of #572 , we propose platform specific validations should be done during the async build step.
This poses a challenge for developers: they submitted a complex graph and one step within the graph is failing a platform specific check, it's hard to trace back the specific operand in the graph the error is about.
I propose to follow WebGPU’s practice to define a MLObjectBase with a label field to let MLOperand extend from.
The usage would be like:
const builder = new MLGraphBuilder(context);
const A = builder.input('0', operandType);
const B = builder.input('1', operandType);
const C = builder.matmul(A, B);
C.label = "step1:matmul";
const D = builder.add(A, C);
D.label = "step2:add";
// ... keep building a complex graph
...
const finalOperand = builder.add(E, F);
// Build the graph.
const graph = await builder.build({'output': finalOperand});
> Uncaught DOMException: Model graph build error: [Operand "step1:matmul"] input dimensions XXX exceed supported limit.
The MLObjectBase could also be extended by:
MLBufferto help with debugging async buffer related errors.MLGraphto help with debugging async errors from chained inference.
Reactions are currently unavailable