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

Small error in instructions.cu example (mul_op) #1

Open
col-mcc opened this issue Oct 23, 2024 · 0 comments
Open

Small error in instructions.cu example (mul_op) #1

col-mcc opened this issue Oct 23, 2024 · 0 comments

Comments

@col-mcc
Copy link

col-mcc commented Oct 23, 2024

mul_op (int) in the instructions.cu example is actually doing an addition!

I'm new to cuda, but I presume the 'add.s32' should be 'mul.lo.s32'.

The output in the readme looks to be reflecting this error too.

I tested out the impact of making this change on a Tesla T4 and it went from -

int add 1.89 3 87.044762 3200 (3276800)
...
int mul 1.89 3 87.348724 3200 (3276800)
float mul 3.14 5 62.641941 3200 (3276800)

to -

int mul 3.14 5 62.652721 3200 (3276800)
float mul 3.14 5 62.641941 3200 (3276800)

(so int and float mul taking roughly equal amounts of time.)

@col-mcc col-mcc changed the title Small error in examples.cu (mul_op) Small error in instructions.cu example (mul_op) Oct 23, 2024
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

1 participant