Skip to content

Commit

Permalink
fix bug in weight reorder
Browse files Browse the repository at this point in the history
conv with stride > 15 case weight reorder bugfix

Change-Id: Ief568e5253828bfdb9f4db198677878af7897d72
  • Loading branch information
charlesxzb committed Feb 25, 2025
1 parent 5167d96 commit 6d4ae8b
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -987,7 +987,7 @@ LogicalResult WeightReorder<tpu::Conv2DOp, Float32Type>::matchAndRewriteImpl(
: align_up(oc_per_groups, npu_num)) *
gic * cell_num_h * max_cell_h * cell_num_w * max_cell_w;
size_t weight_size = groups * weight_size_per_group;
auto data_f32 = std::make_shared<std::vector<float>>(weight_size);
data_f32->resize(weight_size);
int ocloops = ceiling_func(oc_per_groups, npu_num);
for (int group_idx = 0; group_idx < groups; group_idx++) {
for (int oc = 0; oc < oc_per_groups; oc++) {
Expand Down
2 changes: 1 addition & 1 deletion third_party/nntoolchain/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ cp build/firmware_core/libfirmware_core.so /workspace/tpu-mlir/third_party/nntoo
cp build/firmware_core/libfirmware_core.a /workspace/tpu-mlir/third_party/nntoolchain/lib/libbm1684x_kernel_module.a

#bm1688 sha256: 46ba665895c7fd919d01a81262220c23691a6f02

# clip build bugfix: + 817fe9ddd26cf59c0b3ece40c92f087fab1a4607
cd TPU1686
source scripts/envsetup.sh bm1686
debug: rebuild_backend_lib_cmodel
Expand Down
Binary file modified third_party/nntoolchain/lib/libbackend_1688.so
Binary file not shown.
Binary file modified third_party/nntoolchain/lib/libbmtpulv60_kernel_module.a
Binary file not shown.
Binary file modified third_party/nntoolchain/lib/libbmtpulv60_kernel_module.so
Binary file not shown.
Binary file modified third_party/nntoolchain/lib/libcmodel_1688.so
Binary file not shown.

0 comments on commit 6d4ae8b

Please sign in to comment.