Skip to content
This repository has been archived by the owner on Sep 9, 2024. It is now read-only.

Commit

Permalink
chore: Remove step_size in access_map.
Browse files Browse the repository at this point in the history
  • Loading branch information
KuangjuX committed Feb 18, 2024
1 parent f6298a5 commit 7ff0dfa
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
6 changes: 3 additions & 3 deletions examples/rf_graph.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,17 +82,17 @@ int main() {
auto rA_gemm_access_map_i = std::make_shared<AccessMap>(
1, 1, std::vector<std::vector<int32_t>>{std::vector<int32_t>{1}},
std::vector<std::pair<int32_t, int32_t>>{std::make_pair(0, 10)},
std::vector<int32_t>{1}, std::vector<int32_t>{0});
std::vector<int32_t>{0});

auto rB_gemm_access_map_i = std::make_shared<AccessMap>(
1, 1, std::vector<std::vector<int32_t>>{std::vector<int32_t>{1}},
std::vector<std::pair<int32_t, int32_t>>{std::make_pair(0, 10)},
std::vector<int32_t>{1}, std::vector<int32_t>{0});
std::vector<int32_t>{0});

auto gemm_acc_access_map_i = std::make_shared<AccessMap>(
1, 1, std::vector<std::vector<int32_t>>{std::vector<int32_t>{0}},
std::vector<std::pair<int32_t, int32_t>>{std::make_pair(0, 10)},
std::vector<int32_t>{1}, std::vector<int32_t>{0});
std::vector<int32_t>{0});

rA_gemm_edge->setAccessMapI(rA_gemm_access_map_i);
rB_gemm_edge->setAccessMapI(rB_gemm_access_map_i);
Expand Down
5 changes: 2 additions & 3 deletions include/access_map.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,11 @@ namespace tiledkernel {
AccessMap(size_t loop_depth, size_t access_dims,
std::vector<std::vector<int32_t>> access_pattern,
std::vector<std::pair<int32_t, int32_t>> iteration_domain,
std::vector<int32_t> step_size, std::vector<int32_t> offset)
std::vector<int32_t> offset)
: loop_depth(loop_depth),
access_dims(access_dims),
access_pattern(access_pattern),
iteration_domain(iteration_domain),
step_size(step_size),
offset(offset) {
pin_iter_vars.resize(loop_depth);
for (auto& iter_var : pin_iter_vars) {
Expand Down Expand Up @@ -49,7 +48,7 @@ namespace tiledkernel {
// loop_depth
std::vector<std::pair<int32_t, int32_t>> iteration_domain;
// loop_depth
std::vector<int32_t> step_size;
// std::vector<int32_t> step_size;
std::vector<int32_t> offset;

std::vector<std::optional<std::shared_ptr<IterVar>>> pin_iter_vars;
Expand Down
3 changes: 1 addition & 2 deletions src/generator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,7 @@ namespace tiledkernel {
auto iter_var = std::make_shared<IterVar>(
type::DataType::Int32,
access_map_rA->iteration_domain[loop].first,
access_map_rA->iteration_domain[loop].second,
access_map_rA->step_size[loop]);
access_map_rA->iteration_domain[loop].second, 1);

ctx->pushVar(iter_var);
access_map_rA->setPinIterVar(loop, iter_var);
Expand Down

0 comments on commit 7ff0dfa

Please sign in to comment.