tqchen opened a new pull request, #107: URL: https://github.com/apache/tvm-ffi/pull/107
This PR introduces a new C API TVMFFIErrorSetRaisedFromCStrParts. Background: when DSL compilers report errors, sometimes there are common parts that appears multiple times, such as function signature. For example, the following are possible error messages from a DSL. - Argument #1 mismatch in `matmul(x: Tensor, y: Tensor)`, dtype mismatch - Argument #2 mismatch in `matmul(x: Tensor, y: Tensor)`, shape[0] mismatch While we can store each message as const string and pass them to `TVMFFIErrorSetRaisedFromCStr`. There are quite a bit of duplication here. This API allows us to store the error messages in parts, so parts like "mismatch in `matmul(x: Tensor, y: Tensor)`," get reused across multiple error messages. Because DSLs usually have minimal runtime, having a minimal helper C API would simplify the possible overhead of compiler construction side. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
