Skip to content

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

Open
wants to merge 7 commits into
base: dense_merge
Choose a base branch
from
Open

Dense iter #20

wants to merge 7 commits into from

Conversation

sgauthamr2001
Copy link
Collaborator

No description provided.

@sgauthamr2001 sgauthamr2001 requested a review from Copilot April 1, 2025 20:06
Copy link

@Copilot Copilot AI left a 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){"]

Comment on lines +957 to +960
# stmt += " " * (level + 2)
# stmt += "else if (mode == \"reduce\")\n"
# stmt += " " * (level + 3)
# stmt += "partial = read_subtile_output(subtile_path);\n"
Copy link
Preview

Copilot AI Apr 1, 2025

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.

Suggested change
# 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.

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

Successfully merging this pull request may close these issues.

1 participant