Skip to content

Commit 2639f20

Browse files
committed
#3364: Use attribute_values() instead attributes()
1 parent d2d6440 commit 2639f20

File tree

4 files changed

+12
-15
lines changed

4 files changed

+12
-15
lines changed

tt_eager/tt_dnn/op_library/moreh_dot/moreh_dot_op.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,6 @@ operation::ProgramWithCallbacks MorehDot::create_program(
6969
return moreh_dot_single_core(input_tensor_a, input_tensor_b, output_tensor);
7070
}
7171

72-
stl::reflection::Attributes MorehDot::attributes() const {
73-
return {
74-
{"output_mem_config", this->output_mem_config},
75-
{"output_dtype", this->output_dtype},
76-
};
77-
}
7872

7973
} // namespace primary
8074
} // namespace operations

tt_eager/tt_dnn/op_library/moreh_dot/moreh_dot_op.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,12 @@ struct MorehDot {
3030
std::vector<Tensor> create_output_tensors(const std::vector<Tensor> &input_tensors) const;
3131
operation::ProgramWithCallbacks create_program(
3232
const std::vector<Tensor> &input_tensors, std::vector<Tensor> &output_tensors) const;
33-
stl::reflection::Attributes attributes() const;
33+
static constexpr auto attribute_names =
34+
std::make_tuple("output_mem_config", "output_dtype");
35+
const auto attribute_values() const {
36+
return std::make_tuple(
37+
std::cref(this->output_mem_config), std::cref(this->output_dtype));
38+
}
3439
};
3540

3641
inline Tensor moreh_dot(

tt_eager/tt_dnn/op_library/moreh_matmul/moreh_matmul_op.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,13 +77,6 @@ operation::ProgramWithCallbacks MorehMatmul::create_program(
7777
this->output_start_tile_id);
7878
}
7979

80-
stl::reflection::Attributes MorehMatmul::attributes() const {
81-
return {
82-
{"transpose_input", this->transpose_input},
83-
{"transpose_other", this->transpose_other},
84-
};
85-
}
86-
8780
inline void moreh_matmul_validate(
8881
const Tensor& input_tensor, const Tensor& other_tensor, bool transpose_input, bool transpose_other) {
8982
const auto& input_shape = input_tensor.shape().without_padding();

tt_eager/tt_dnn/op_library/moreh_matmul/moreh_matmul_op.hpp

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,12 @@ struct MorehMatmul {
4545
std::vector<Tensor> create_output_tensors(const std::vector<Tensor> &input_tensors) const;
4646
operation::ProgramWithCallbacks create_program(
4747
const std::vector<Tensor> &input_tensors, std::vector<Tensor> &output_tensors) const;
48-
tt::stl::reflection::Attributes attributes() const;
48+
static constexpr auto attribute_names =
49+
std::make_tuple("transpose_input", "transpose_other");
50+
const auto attribute_values() const {
51+
return std::make_tuple(
52+
std::cref(this->transpose_input), std::cref(this->transpose_other));
53+
}
4954
};
5055

5156
Tensor moreh_matmul(

0 commit comments

Comments
 (0)