-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[VERILOG] VPI RAM controler to access python memory. #72
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
Conversation
| // Usage: create and pass instance to additional arguments of $tvm_session. | ||
| // Then it will be automatically hook up the RAM logic. | ||
| // | ||
| module tvm_vpi_ram |
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.
For the tvm_vpi_ram module I would probably not use the 'in'/'out'/'ctrl' prefixes
| module tvm_vpi_ram | ||
| # ( parameter READ_WIDTH = 8, | ||
| parameter WRITE_WIDTH = 8 | ||
| ) |
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.
We should add more parameters (see below)
| ) | ||
| ( clk, | ||
| rst, | ||
| in_read_dequeue, |
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.
dequeue
| ( clk, | ||
| rst, | ||
| in_read_dequeue, | ||
| in_write_enable, |
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.
enqueue
tmoreau89
left a comment
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.
Overall this looks good - I made some suggestions on the verilog module input/output and parameter list (I'll point you to my buffer implementation tomorrow)
| in_read_dequeue, | ||
| in_write_enable, | ||
| in_write_data, | ||
| ctrl_read_req, |
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.
read_en
| in_write_data, | ||
| ctrl_read_req, | ||
| ctrl_read_addr, | ||
| ctrl_read_size, |
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.
I think that this should be a parameter instead of an input (mostly for performance reasons, we can discuss this tomorrow)
| ctrl_read_req, | ||
| ctrl_read_addr, | ||
| ctrl_read_size, | ||
| ctrl_write_req, |
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.
write_en
| ctrl_write_addr, | ||
| ctrl_write_size, | ||
| out_read_data, | ||
| out_read_valid, |
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.
not sure if this 'read_valid' signal is needed since the validity of the read is really determined by the module that consumes the data (and also produces the read address the cycle before)
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.
I am thinking of a scenario where the module only takes charge of hook up the data, and simply connect it to next generalized FIFO, where such signal will be helpful
| ctrl_write_size, | ||
| out_read_data, | ||
| out_read_valid, | ||
| out_write_full |
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.
Instead of write full, we should have full and empty signals, and also a counter would be useful (counts the number of elements currently stored in the buffer)
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 are two queues actually in this RAM module, one for read, and another one for the write, are you suggesting we need to have two signals, like
read_pending and write_pending?
| input in_write_enable; | ||
| input [WRITE_WIDTH-1:0] in_write_data; | ||
| input ctrl_read_req; | ||
| input [31:0] ctrl_read_addr; |
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.
This should be parameterizable (instead of set to 32) since we can benefit from narrower address widths in order to optimize for timing closure.
* init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase
* init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase
* init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase
…er (apache#76) * [CI] Set up CI; format and lint relax code to pass CI (apache#72) * init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase * AutoTIR integration (apache#58) * [WIP] Basic task extraction mechanism is implemented. * [WIP] For gradual integration with Relay pipeline, meta_schedule/integration.py is created for relax to avoid potential conflict. * support tir tuning and injection mode * Add target field for Relax Extracted Task * 1. Create relax namespace/tvm objects/... for metaschedule to preserve relay support. 2. Promote target field from Optional<Target> to Target * Support ApplyHistoryBest * Reflect feedback from Yuchen * minor improvement and fix linter issue * add ASF header * Reorganize file structure * fix lint errors * remove the import-outside-toplevel * Reflect comments * remove redundant comment * As per discussion w/ Yuchen, ApplyHistoryBest is introduced as a Relax transformation pass. * remove redundant print msg * fix lint * reflect comments * Yuchen's change * relax ConstantNode in parser and printer * Add constant data in the metasection * rebase * Support ir_module(metadata=json_str) * update test case * remove print info * Update tests * clang-format * pylint * fix ci * Save a copy of metadata in RelaxTransformer * Fix comments * fix comments Co-authored-by: Yuchen Jin <[email protected]> Co-authored-by: Sunghyun Park <[email protected]>
* init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase
…er (apache#76) * [CI] Set up CI; format and lint relax code to pass CI (apache#72) * init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase * AutoTIR integration (apache#58) * [WIP] Basic task extraction mechanism is implemented. * [WIP] For gradual integration with Relay pipeline, meta_schedule/integration.py is created for relax to avoid potential conflict. * support tir tuning and injection mode * Add target field for Relax Extracted Task * 1. Create relax namespace/tvm objects/... for metaschedule to preserve relay support. 2. Promote target field from Optional<Target> to Target * Support ApplyHistoryBest * Reflect feedback from Yuchen * minor improvement and fix linter issue * add ASF header * Reorganize file structure * fix lint errors * remove the import-outside-toplevel * Reflect comments * remove redundant comment * As per discussion w/ Yuchen, ApplyHistoryBest is introduced as a Relax transformation pass. * remove redundant print msg * fix lint * reflect comments * Yuchen's change * relax ConstantNode in parser and printer * Add constant data in the metasection * rebase * Support ir_module(metadata=json_str) * update test case * remove print info * Update tests * clang-format * pylint * fix ci * Save a copy of metadata in RelaxTransformer * Fix comments * fix comments Co-authored-by: Yuchen Jin <[email protected]> Co-authored-by: Sunghyun Park <[email protected]>
* init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase
…er (apache#76) * [CI] Set up CI; format and lint relax code to pass CI (apache#72) * init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase * AutoTIR integration (apache#58) * [WIP] Basic task extraction mechanism is implemented. * [WIP] For gradual integration with Relay pipeline, meta_schedule/integration.py is created for relax to avoid potential conflict. * support tir tuning and injection mode * Add target field for Relax Extracted Task * 1. Create relax namespace/tvm objects/... for metaschedule to preserve relay support. 2. Promote target field from Optional<Target> to Target * Support ApplyHistoryBest * Reflect feedback from Yuchen * minor improvement and fix linter issue * add ASF header * Reorganize file structure * fix lint errors * remove the import-outside-toplevel * Reflect comments * remove redundant comment * As per discussion w/ Yuchen, ApplyHistoryBest is introduced as a Relax transformation pass. * remove redundant print msg * fix lint * reflect comments * Yuchen's change * relax ConstantNode in parser and printer * Add constant data in the metasection * rebase * Support ir_module(metadata=json_str) * update test case * remove print info * Update tests * clang-format * pylint * fix ci * Save a copy of metadata in RelaxTransformer * Fix comments * fix comments Co-authored-by: Yuchen Jin <[email protected]> Co-authored-by: Sunghyun Park <[email protected]>
* init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase
…er (apache#76) * [CI] Set up CI; format and lint relax code to pass CI (apache#72) * init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase * AutoTIR integration (apache#58) * [WIP] Basic task extraction mechanism is implemented. * [WIP] For gradual integration with Relay pipeline, meta_schedule/integration.py is created for relax to avoid potential conflict. * support tir tuning and injection mode * Add target field for Relax Extracted Task * 1. Create relax namespace/tvm objects/... for metaschedule to preserve relay support. 2. Promote target field from Optional<Target> to Target * Support ApplyHistoryBest * Reflect feedback from Yuchen * minor improvement and fix linter issue * add ASF header * Reorganize file structure * fix lint errors * remove the import-outside-toplevel * Reflect comments * remove redundant comment * As per discussion w/ Yuchen, ApplyHistoryBest is introduced as a Relax transformation pass. * remove redundant print msg * fix lint * reflect comments * Yuchen's change * relax ConstantNode in parser and printer * Add constant data in the metasection * rebase * Support ir_module(metadata=json_str) * update test case * remove print info * Update tests * clang-format * pylint * fix ci * Save a copy of metadata in RelaxTransformer * Fix comments * fix comments Co-authored-by: Yuchen Jin <[email protected]> Co-authored-by: Sunghyun Park <[email protected]>
* init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase
…er (apache#76) * [CI] Set up CI; format and lint relax code to pass CI (apache#72) * init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase * AutoTIR integration (apache#58) * [WIP] Basic task extraction mechanism is implemented. * [WIP] For gradual integration with Relay pipeline, meta_schedule/integration.py is created for relax to avoid potential conflict. * support tir tuning and injection mode * Add target field for Relax Extracted Task * 1. Create relax namespace/tvm objects/... for metaschedule to preserve relay support. 2. Promote target field from Optional<Target> to Target * Support ApplyHistoryBest * Reflect feedback from Yuchen * minor improvement and fix linter issue * add ASF header * Reorganize file structure * fix lint errors * remove the import-outside-toplevel * Reflect comments * remove redundant comment * As per discussion w/ Yuchen, ApplyHistoryBest is introduced as a Relax transformation pass. * remove redundant print msg * fix lint * reflect comments * Yuchen's change * relax ConstantNode in parser and printer * Add constant data in the metasection * rebase * Support ir_module(metadata=json_str) * update test case * remove print info * Update tests * clang-format * pylint * fix ci * Save a copy of metadata in RelaxTransformer * Fix comments * fix comments Co-authored-by: Yuchen Jin <[email protected]> Co-authored-by: Sunghyun Park <[email protected]>
* init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase
…er (apache#76) * [CI] Set up CI; format and lint relax code to pass CI (apache#72) * init * fix lint * update task_lint * more lint * more lint * lint * jenkinsfile * jenkinsfile * run relax only tests * python3.7 for pytest * point to personal ci-cpu docker * docker pull * test * fix cmake config * update * update * rebase * rebase * AutoTIR integration (apache#58) * [WIP] Basic task extraction mechanism is implemented. * [WIP] For gradual integration with Relay pipeline, meta_schedule/integration.py is created for relax to avoid potential conflict. * support tir tuning and injection mode * Add target field for Relax Extracted Task * 1. Create relax namespace/tvm objects/... for metaschedule to preserve relay support. 2. Promote target field from Optional<Target> to Target * Support ApplyHistoryBest * Reflect feedback from Yuchen * minor improvement and fix linter issue * add ASF header * Reorganize file structure * fix lint errors * remove the import-outside-toplevel * Reflect comments * remove redundant comment * As per discussion w/ Yuchen, ApplyHistoryBest is introduced as a Relax transformation pass. * remove redundant print msg * fix lint * reflect comments * Yuchen's change * relax ConstantNode in parser and printer * Add constant data in the metasection * rebase * Support ir_module(metadata=json_str) * update test case * remove print info * Update tests * clang-format * pylint * fix ci * Save a copy of metadata in RelaxTransformer * Fix comments * fix comments Co-authored-by: Yuchen Jin <[email protected]> Co-authored-by: Sunghyun Park <[email protected]>
…pache#72) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: Ruihang Lai <[email protected]> Co-authored-by: Egor Churaev <[email protected]> Co-authored-by: Xiyou Zhou <[email protected]> Co-authored-by: Wuwei Lin <[email protected]> Co-authored-by: Eric Lunderberg <[email protected]> Co-authored-by: Eric Lunderberg <[email protected]> Co-authored-by: Chris Sullivan <[email protected]> Co-authored-by: masahi <[email protected]> Co-authored-by: albert qing <[email protected]> Co-authored-by: qsqqsqqsq-intellif <[email protected]> Co-authored-by: Hongyi Jin <[email protected]> Co-authored-by: Aleksei-grovety <[email protected]> Co-authored-by: Luke Hutton <[email protected]> Co-authored-by: Steven S. Lyubomirsky <[email protected]> Co-authored-by: Tianqi Chen <[email protected]> Co-authored-by: Abhikrant Sharma <[email protected]> Co-authored-by: Siva <[email protected]> Co-authored-by: Andrei Hutu <[email protected]> Co-authored-by: Jiawei Shao <[email protected]> Co-authored-by: Siyuan Feng <[email protected]> Co-authored-by: Masahiro Hiramori <[email protected]> Co-authored-by: Anirudh Sundar Subramaniam <[email protected]> Co-authored-by: Balint Cristian <[email protected]> Co-authored-by: Yaxing Cai <[email protected]> Co-authored-by: Wei Tao <[email protected]> Co-authored-by: Charlie Ruan <[email protected]> Co-authored-by: Thais Camacho <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Archermmt <[email protected]> Co-authored-by: Hangrui Cao <[email protected]> Co-authored-by: padreofthegame <[email protected]> Co-authored-by: Elen Kalda <[email protected]> Co-authored-by: Neil Hickey <[email protected]> Co-authored-by: Yixin Dong <[email protected]> Co-authored-by: Chris Sullivan <[email protected]> Co-authored-by: Otto Rasmussen <[email protected]> Co-authored-by: Mengshiun Yu <[email protected]> Co-authored-by: ZCHNO <[email protected]> Co-authored-by: Star Yuan <[email protected]>
* chore: Update support matrix in README * Move bitblas package to root * Remove unused code files * Create soft link for tvm * Create soft link for tvm * Update softlink paths for tvm in setup.py * Refactor import statements to use relative paths * fix test linear * Move bitblas package to root * Move bitblas package to root * refactor splitk test * Fix assert statement in ladder_permutate_impl.py * Refactor test_ladder_permutate_ops.py for improved readability and maintainability * Refactor test_ladder_permutate_ops.py for improved readability and maintainability * improve and evaluate the test scripts. * resolve security issue.
No description provided.