未验证 提交 2b8e6285 编写于 作者: 张春乔 提交者: GitHub

[IR Dialect] Elden chapter 1.1 (#55525)

* IntArrayAttributeStorage
上级 6da9db50
......@@ -16,7 +16,9 @@
namespace paddle {
namespace dialect {
phi::IntArray IntArrayAttribute::data() const { return storage()->GetAsKey(); }
const phi::IntArray& IntArrayAttribute::data() const {
return storage()->GetAsKey();
}
phi::DataType DataTypeAttribute::data() const { return storage()->GetAsKey(); }
......
......@@ -33,7 +33,7 @@ class IntArrayAttribute : public ir::Attribute {
return storage() < right.storage();
}
phi::IntArray data() const;
const phi::IntArray &data() const;
};
class ScalarAttribute : public ir::Attribute {
......
......@@ -48,7 +48,7 @@ struct IntArrayAttributeStorage : public ir::AttributeStorage {
(data_.FromTensor() == key.FromTensor());
}
ParamKey GetAsKey() const { return ParamKey(data_); }
const ParamKey &GetAsKey() const { return data_; }
private:
phi::IntArray data_;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册