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

Fix torch bloat16 -> numpy float32 conversion for compile max-autotune #96

Merged
merged 1 commit into from
Dec 7, 2023

Commits on Dec 5, 2023

  1. Fix torch bloat16 -> numpy float32 conversion for compile max-autotune

    Tested on A6000 ADA, Torch 2.2.0.dev20231026. When running with the compiled, mixed precision model, the iou_predictions are in `bfloat16` which are not automatically castable to a numpy array.
    
    As a workaround, I propose to cast those tensors to float before passing them to numpy, so you can avoid the problem.
    
    Please note that float32 is more compatible than half, due to its representation limits.
    
    Regards.
    mawanda-jun authored Dec 5, 2023
    Configuration menu
    Copy the full SHA
    9316f30 View commit details
    Browse the repository at this point in the history