Skip to content

shared weight tpconv #73

@nullplay

Description

@nullplay

Hi,

I found a bug (probably?) where the tpconv with shared_weight=True does not generate correct code.
It seems the tpconv kernel generator might be missing an if-else statement to handle the shared-weight case correctly.

batchtp:

{%- if not tpp.shared_weights %}
WEIGHT_T* w = weights + i * {{tpp.weight_numel}};
{%- else %}
WEIGHT_T* w = weights;
{%- endif %}

conv:

IRREP_T* l1 = L1_in + col * {{forward_schedule.L1.dim}} + lane_id;
IRREP_T* l2 = L2_in + i * {{forward_schedule.L2.dim}} + lane_id;
IRREP_T* l3 = L3_out + row * {{forward_schedule.L3.dim}} + lane_id;
WEIGHT_T* w = weights + i * {{tpp.weight_numel}};

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions