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

Why GPU and NPU give different results? #351

Open
chn-lee-yumi opened this issue Aug 22, 2024 · 2 comments
Open

Why GPU and NPU give different results? #351

chn-lee-yumi opened this issue Aug 22, 2024 · 2 comments

Comments

@chn-lee-yumi
Copy link

I fixed the random seed, and use GPU and NPU to generate an image separately.

This is from GPU:
A_high_quality_photo_of_a_surfing_dog_gpu_40

This is from NPU:
A_high_quality_photo_of_a_surfing_dog_npu_40

As I know, GPU and NPU both use FP16 for inference. I think they should have the same result. Why they are different?

@atiorh
Copy link
Collaborator

atiorh commented Aug 29, 2024

This is expected (Also check out the visual in this README section). TL;DR: Kernel numerics are different.

@chn-lee-yumi
Copy link
Author

Kernel numerics are different

@atiorh Could you explain this? Does it mean the weights will be slightly changed when loaded to NPU?

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

2 participants