Skip to content

Commit

Permalink
[PIR] Reify InferSymbolicShapeInterface (#60438)
Browse files Browse the repository at this point in the history
* Reify InferSymbolicShapeInterface
  • Loading branch information
zhangbopd authored Jan 9, 2024
1 parent 0dfba1a commit b80ece9
Show file tree
Hide file tree
Showing 16 changed files with 411 additions and 234 deletions.
3 changes: 3 additions & 0 deletions paddle/cinn/hlir/framework/pir/utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "paddle/phi/common/data_type.h"
#include "paddle/pir/core/builtin_op.h"
#include "paddle/pir/core/builtin_type.h"
#include "paddle/pir/dialect/shape/ir/shape_attribute.h"

namespace cinn {
namespace hlir {
Expand Down Expand Up @@ -146,6 +147,8 @@ utils::Attribute CompatibleInfo::ConvertAttribute(
} else if (src_attr.isa<paddle::dialect::DataTypeAttribute>()) {
auto dtype = src_attr.dyn_cast<paddle::dialect::DataTypeAttribute>().data();
dst_attr = phi::DataTypeToString(dtype);
} else if (src_attr.isa<::pir::shape::SymbolAttribute>()) {
auto dst_attr = src_attr.dyn_cast<::pir::shape::SymbolAttribute>().data();
} else if (src_attr.isa<::pir::ArrayAttribute>()) {
auto attr_vec = src_attr.dyn_cast<::pir::ArrayAttribute>().AsVector();
if (attr_vec.size() > 0) {
Expand Down
1 change: 0 additions & 1 deletion paddle/fluid/inference/paddle_inference.map
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,6 @@
*Pass*;
*profile*;
*phi*;
*pir*;
PD_*;
*cinn*;
local:
Expand Down
2 changes: 1 addition & 1 deletion paddle/fluid/inference/utils/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ cc_library(
DEPS proto_desc enforce common)

cc_library(table_printer SRCS table_printer.cc)
paddle_test(test_table_printer SRCS table_printer_tester.cc)
paddle_test(test_table_printer SRCS table_printer_tester.cc DEPS pir)

proto_library(shape_range_info_proto SRCS shape_range_info.proto)

Expand Down
Loading

0 comments on commit b80ece9

Please sign in to comment.