Skip to content

Commit

Permalink
add resnet18 first layer name entry to tpu_like mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
asyms committed May 16, 2024
1 parent 9c13fab commit f890e92
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
16 changes: 16 additions & 0 deletions inputs/mapping/tpu_like.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# Default entry in case layer name and operator type are not available
- name: default
core_allocation: [1]
spatial_mapping:
Expand All @@ -10,6 +11,20 @@
W: I2
I: I1

# Mapping entry for specific layer name
- name: example_name_of_layer0
core_allocation: [1]
spatial_mapping:
D1:
- K, 32
D2:
- C, 32
memory_operand_links:
O: O
W: I2
I: I1

# Entry for 'Add' operator type
- name: Add
core_allocation: [1]
spatial_mapping:
Expand All @@ -22,6 +37,7 @@
W: I2
I: I1

# Entry for 'Pooling' operator type
- name: Pooling
core_allocation: [1]
spatial_mapping:
Expand Down
4 changes: 2 additions & 2 deletions inputs/workload/resnet18.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
- id: 0 # conv1 stride 2
name: example_name_of_layer0
operator_type: Conv
name: example_name_of_layer0 # name can be used to specify mapping
operator_type: Conv # operator_type can be used to specify mapping
equation: O[b][k][oy][ox]+=W[k][c][fy][fx]*I[b][c][iy][ix]
dimension_relations: [ix=2*ox+1*fx, iy=2*oy+1*fy]
loop_dims: [B, K, C, OY, OX, FY, FX]
Expand Down

0 comments on commit f890e92

Please sign in to comment.