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

Use 32 threads per warp for dot test on Arc #885

Draft
wants to merge 1 commit into
base: llvm-target
Choose a base branch
from

Conversation

alexbaden
Copy link
Contributor

@alexbaden alexbaden commented Apr 16, 2024

The lower threads per warp is causing a shared memory resource error on A770:

FAILED language/test_core.py::test_dot[1-64-128-128-4-True-False-none-tf32-float32-float32] - triton.runtime.errors.OutOfResources: out of resource: shared memory, Required: 98304, Hardware limit: 65536. Reducing blo...

This change resolves some of those issues but I am investigating a few others that popped up after the original threads per warp change (af0a308). I think those have to do with newly enabled multiplication tests, however.

#890

Copy link
Contributor

@whitneywhtsang whitneywhtsang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add Arc CI testing to prevent future regression?

return is_xpu() and triton.runtime.driver.active.get_current_target()[1]['has_fp64']

def threads_per_warp_dpas():
return 16 if xpu_has_fp64() else 32
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

assert is_xpu()

@@ -34,6 +34,11 @@ def is_hip():
def is_xpu():
return not is_interpreter() and triton.runtime.driver.active.get_current_target()[0] == "xpu"

def xpu_has_fp64():
return is_xpu() and triton.runtime.driver.active.get_current_target()[1]['has_fp64']
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer assert is_xpu() then return is_xpu() and ..., WDYT?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I left asserts out in this draft and made the functions general because I was not sure whether we would want to have a more general threads per warp function (especially for compatibility with upstream) vs a specific function we expect to only call in xpu mode. Let me finish cataloguing the issues under Arc so we can see how extensively we need to modify tests, then I will revisit making these specialized XPU functions vs generic free functions to properly configure the test (/ kernel launch) based on the available hardware.

@vlad-penkin vlad-penkin linked an issue Apr 18, 2024 that may be closed by this pull request
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

Successfully merging this pull request may close these issues.

dGPU out of resource error with threads per warp set at 16
2 participants