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

BFMap does not work with half precision floats #238

Open
dentalfloss1 opened this issue Jun 3, 2024 · 1 comment
Open

BFMap does not work with half precision floats #238

dentalfloss1 opened this issue Jun 3, 2024 · 1 comment

Comments

@dentalfloss1
Copy link
Collaborator

dentalfloss1 commented Jun 3, 2024

BFMap fails without good debugging information when trying to use half precision floats.
Minimal example:

from bifrost import map as BFMap
import numpy as np
import traceback
for dtype in ['f8','f4','f2','i8','i4','i2']:
    print("Using dtype",dtype)
    try:
        A = BFArray(np.arange(2000,dtype=dtype),space='cuda')
        B = BFArray(np.arange(2000,dtype=dtype),space='cuda')
        C = BFArray(np.arange(2000,dtype=dtype),space='cuda')
        BFMap("""C(i)=A(i)*B(i)""",{'C':C,'B':B,'A':A},axis_names=('i'),shape=(2000,))

        out = C.copy('system')
    except Exception:
        print(traceback.format_exc())```
@jaycedowell
Copy link
Collaborator

Sounds like it is similar to this: #130

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