Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possible issues in get_act_layer_op and get_weight_layer_op #99

Open
yuli821 opened this issue Dec 12, 2024 · 0 comments
Open

Possible issues in get_act_layer_op and get_weight_layer_op #99

yuli821 opened this issue Dec 12, 2024 · 0 comments

Comments

@yuli821
Copy link

yuli821 commented Dec 12, 2024

Hi, I'm using Zigzag to analyze a customized vision transformer model and trying to map it onto Digital IMC architecture. One thing I observed is that when there are no constant operands, get_act_layer_op always selects the second input operand (layer_node.py, line 206) and get_weight_layer_op always selects the first input operand. I printed out the selected operand and found out the returned act_layer_op is W and weight_layer_op is I. This raised an issue in calculate_mapped_rows_when_diagonal_mapping_found since the act_pr_layer_dims will always be empty if act_layer_op is W.

I simply switch the index to resolve the error, but I'm not sure if the logic is correct here. Why does the original code select the second input operand for act_layer_op and the first operand for weight_layer_op? Is there a specific reason behind it? I'm not sure if this fix is valid here.

I'm also confused about how lab6 (main.py) computes the overall latency running workload on imc architecture: delay_in_ns = energy * cmes[0].tclk. I printed out cmes[0].tclk, which looks like the clock cycles period. Why does the code multiply energy with the clock cycle period to get the delay? Should it multiply the latency(total number of clock cycles) by the clock period?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant