10000 BFMap does not work with half precision floats · Issue #238 · lwa-project/bifrost · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
BFMap does not work with half precision floats #238
Open
@dentalfloss1

Description

@dentalfloss1

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())```

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0