120812e9ac
This PR lets Relax expressions directly take `PrimExpr` values without requiring the explicit `PrimValue` wrapper, continuing the Relax IR unification work by removing Relax-specific leaf/base expression layers. Summary: - Remove `LeafExpr` / `LeafExprNode` and use direct expression-node checks where needed. - Converge Relax expression typing onto the shared IR `Expr` base. - Remove the `PrimValue` node wrapper while keeping `relax.prim_value` / `R.prim_value` as conversion helpers that return existing `PrimExpr` values unchanged. - Register direct `PrimExpr` handling through exact concrete node dispatch, aligned with the `tirx` expression visitor list and excluding arith iter-map intermediate nodes. - Inline the private Python primitive conversion helper into public `relax.prim_value`. - Handle direct `PrimExpr` values in frontend scalar paths without assuming a `.value` field on non-immediate expressions.
25 lines
927 B
ReStructuredText
25 lines
927 B
ReStructuredText
.. Licensed to the Apache Software Foundation (ASF) under one
|
|
or more contributor license agreements. See the NOTICE file
|
|
distributed with this work for additional information
|
|
regarding copyright ownership. The ASF licenses this file
|
|
to you under the Apache License, Version 2.0 (the
|
|
"License"); you may not use this file except in compliance
|
|
with the License. You may obtain a copy of the License at
|
|
|
|
.. http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
.. Unless required by applicable law or agreed to in writing,
|
|
software distributed under the License is distributed on an
|
|
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
|
KIND, either express or implied. See the License for the
|
|
specific language governing permissions and limitations
|
|
under the License.
|
|
|
|
tvm.ir
|
|
------
|
|
.. automodule:: tvm.ir
|
|
:members:
|
|
:imported-members:
|
|
:exclude-members: Expr
|
|
:autosummary:
|