Skip to content

Commit ad05f5c

Browse files
committed
Temporarily remove stack_contents
1 parent 727fd85 commit ad05f5c

File tree

5 files changed

+13
-9
lines changed

5 files changed

+13
-9
lines changed

lib/local-execution/src/ops/transpose.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
#include "kernels/transpose_kernels.h"
1818
#include "op-attrs/get_output_shapes.h"
1919
#include "op-attrs/ops/transpose.h"
20+
#include "utils/integer_conversions.h"
2021

2122
using namespace FlexFlow::Kernels::Transpose;
2223

@@ -39,11 +40,11 @@ OpTaskInvocation init(TransposeAttrs const &attrs) {
3940
static DeviceSpecificDeviceStates
4041
init_task_impl(TaskArgumentAccessor const &acc) {
4142
auto const &attrs = acc.get_argument<TransposeAttrs>(ATTRS);
42-
size_t size = attrs.perm.size();
43+
int size = int_from_size_t(attrs.perm.size());
4344

4445
std::vector<ff_dim_t> perm = [&] {
4546
std::vector<ff_dim_t> result;
46-
for (size_t i : range(size)) {
47+
for (int i : range(size)) {
4748
result.push_back(ff_dim_t{nonnegative_int{size - i - 1}});
4849
}
4950
return result;

lib/utils/include/utils/stack_string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ struct stack_basic_string {
5757

5858
friend struct std::hash<stack_basic_string>;
5959

60-
friend fmt::basic_string_view<Char>
60+
friend std::string
6161
format_as(stack_basic_string<Char, MAXSIZE> const &s) {
62-
return {s.contents.stack_contents().data(), s.length()};
62+
return {s.contents.cbegin(), s.contents.cend()};
6363
}
6464

6565
private:

lib/utils/include/utils/stack_vector/stack_vector.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -292,10 +292,6 @@ struct stack_vector {
292292
return (this->m_size == 0);
293293
}
294294

295-
std::array<element_type, MAXSIZE> stack_contents() const {
296-
return this->contents;
297-
}
298-
299295
friend std::string format_as(stack_vector<T, MAXSIZE> const &v) {
300296
CHECK_FMTABLE(T);
301297

@@ -305,7 +301,6 @@ struct stack_vector {
305301
});
306302
return "[" + result + "]";
307303
}
308-
309304
private:
310305
std::size_t m_size = 0;
311306
std::array<element_type, MAXSIZE> contents;
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#include "utils/stack_string.h"
2+
3+
namespace FlexFlow {
4+
5+
template struct stack_basic_string<char, 5>;
6+
7+
} // namespace FlexFlow

lib/utils/src/utils/stack_vector/stack_vector.cc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,6 @@ namespace FlexFlow {
66
using T = ordered_value_type<0>;
77

88
template struct stack_vector<T, 5>;
9+
template struct stack_vector<int, 5>;
910

1011
} // namespace FlexFlow

0 commit comments

Comments
 (0)