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

Add PTX Debug #88

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from
Open

Add PTX Debug #88

wants to merge 2 commits into from

Conversation

negargoli
Copy link
Contributor

add relevant store after each instruction in ptx code

Copy link
Collaborator

@tgrogers tgrogers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall I think this looks okay.
However, the code to emit the debug PTX is always run (even if we are not debugging anything) - I think this will only happen when the code is loaded so the perf hit is minimal, but interleaving all the debugging code with the normal execution code makes it really hard to read/modify. Can we try to pull all the code creating the debug code into separate function instead of sprinkling it all over the normal flow?

if( num_elem >= 6 ) out[5] = o.reg6_num();
if( num_elem >= 7 ) out[6] = o.reg7_num();
if( num_elem >= 8 ) out[7] = o.reg8_num();
if( num_elem >= 1 )
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clearly this works - but can we separate all the debug code creation from the normal code flow?
All this code is actually called even if we not doing the debug part...
Can we pull the creation of the debug ptx into a separate function, only called when debugging is enabled?

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.

2 participants