-
Notifications
You must be signed in to change notification settings - Fork 0
Dense iter #20
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
base: dense_merge
Are you sure you want to change the base?
Dense iter #20
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces support for dense iterations and integrates a new data_format mechanism to handle both sparse and dense tensor representations. Key changes include:
- Enhancements in pre_process.py to add a new tensor dumper class and a tiled tensor parser.
- Addition of mem_op_gen.py for generating C++ memory operation code and adjustments in main.py and gold_cgen.py to integrate the data_format workflow.
- Extensive modifications in codegen.py to propagate the new data_format and data_format_dict parameters in various code‐generation routines.
Reviewed Changes
Copilot reviewed 5 out of 7 changed files in this pull request and generated 1 comment.
Show a summary per file
File | Description |
---|---|
pre_process.py | Added PydataSparseTensorDumper class and parse_tiled_tensor function; updated process_coo logic to integrate data_format. |
mem_op_gen.py | New file for generating C++ struct definitions and memory operation functions. |
main.py | Updated parsing functions and tensor declarations to support data_format. |
gold_cgen.py | Minor modifications to integrate the data_format dict in the generated gold code. |
codegen.py | Extensive changes to include data_format parameters in code generation functions and update control‐flow statements accordingly. |
Files not reviewed (2)
- input/program.txt: Language not supported
- input/tensor.txt: Language not supported
Comments suppressed due to low confidence (2)
pre_process.py:215
- Consider using 'if keys is not None:' instead of 'if keys != None:' to ensure proper type-safe comparison.
if keys != None:
codegen.py:501
- Using a fallback condition 'if(1){' when no sparse sub-points are found may cause unintended execution of the if-block. Please verify that this behavior is intentional.
return ["if(1){"]
# stmt += " " * (level + 2) | ||
# stmt += "else if (mode == \"reduce\")\n" | ||
# stmt += " " * (level + 3) | ||
# stmt += "partial = read_subtile_output(subtile_path);\n" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is commented-out code within the cp_op_stmt function that could be removed to reduce confusion and improve code clarity if it is no longer necessary.
# stmt += " " * (level + 2) | |
# stmt += "else if (mode == \"reduce\")\n" | |
# stmt += " " * (level + 3) | |
# stmt += "partial = read_subtile_output(subtile_path);\n" | |
Copilot uses AI. Check for mistakes.
No description provided.