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

params_dict should enforce dtype on values #16

Open
TK-21st opened this issue Jan 8, 2021 · 0 comments
Open

params_dict should enforce dtype on values #16

TK-21st opened this issue Jan 8, 2021 · 0 comments

Comments

@TK-21st
Copy link
Member

TK-21st commented Jan 8, 2021

If a given node has a parameter value specified as int (like 'param': 123) instead of float (like 'param':123.),
if is passed into the kernel as integer type. However, if the CUDA kernel specifies that the input argument is a floating point variable (like double), the parameter value will be set to cast to floating type with value 0.

In my opinion, in NDComponent __init__, params_dict should enforce a uniform dtype on the parameter values.
Or if there is a way to check the expected dtype from the cuda kernel in the pre_run stage and, if inconsistent between params_dict and the expected dtypes from the kernel, send a warning and convert to the one required by the kernel.

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