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

Run ptx directly in GPGPUSim #272

Open
ishitachaturvedi opened this issue Dec 7, 2022 · 2 comments
Open

Run ptx directly in GPGPUSim #272

ishitachaturvedi opened this issue Dec 7, 2022 · 2 comments

Comments

@ishitachaturvedi
Copy link

Can I run ptx using gpgpusim, instead of running a binary?

@topcuburak
Copy link

@ishitachaturvedi
Yes, you can. I suggest you read simulator papers. The last one (Accel-Sim paper) mentioned that the accel-sim version could execute the ptx code. However, they suggested using the SASS instead of the ptx because the ptx is a virtual machine code and executes with some assumptions. In that paper, they also provided correlation results explaining the difference between SASS and PTX execution results concerning real hardware execution.

@nothingface0
Copy link

@ishitachaturvedi

Assuming you want a PTX of a specific version (let's say 7.0), you need to compile your binary with -gencode=arch=compute_70,code=compute_70. This will embed PTX 7.0 in your executable (code= determines what will end up inside the executable, compute_XX determines PTX instructions).

Then, doing a source setup_environment should be enough to let you execute the binary via GPGPU-Sim.

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

3 participants