From 7ebc082cb2ae6e69659c8a1c6043c309c8f529ee Mon Sep 17 00:00:00 2001 From: Steven Lyubomirsky Date: Mon, 13 Feb 2023 15:41:40 -0500 Subject: [PATCH] Fix typo --- relax_spec.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/relax_spec.md b/relax_spec.md index 27953d2023..839c96d9f7 100644 --- a/relax_spec.md +++ b/relax_spec.md @@ -752,7 +752,7 @@ For each expression, we define how it affects the program's visible state and th 1. First `cond` is evaluated. Let the result be `r` (per `StructInfo` checking, it must be a `Bool` scalar). 2. If `r` is true, evaluate the `true_branch` and return its result. 3. If `r` is false, evaluate the `false_branch` and return its result. -11. The node `ExternFunc(global_symbol)` is evaluated by looking up the global symbol name and returning the `PackedFunc` if it exists (it is an error if it does not.) Note that if a TIR `PrimFunc` in the `IRModule` has a global symbol attribute registered, it can be called as an `ExternFunc` using that global symbol as well. +11. The node `ExternFunc(global_symbol)` is evaluated by looking up the global symbol name and returning the `PackedFunc` if it exists (it is an error if it does not). Note that if a TIR `PrimFunc` in the `IRModule` has a global symbol attribute registered, it can be called as an `ExternFunc` using that global symbol as well. 12. The node `Call(op, [arg1, arg2, ..., argn])` is evaluated as follows: 1. If `op` is an `Op` node, then evaluate `arg1`, `arg2`, …, `argn` in that order and call the results `a1`, `a2`, …, `an`. It is up to the compiler implementation to decide how operators should be implemented (some may have an associated `PackedFunc` and others may be built into the executor implementation). The operator may mutate its arguments. It is also up to the operator implementation as to whether the result is newly allocated or aliases another value. «(TODO: Once we have operators for logical and AND and OR, we should also define short-circuiting semantics for those.)» 2. Otherwise, first evaluate `op` (it must evaluate to a closure or `PackedFunc`). Next, we evaluate `arg1`, `arg2`, …, `argn` in that order and call the results `a1`, `a2`, …, `an`.