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

Modify to check if alpha is in host memory. #1356

Open
wants to merge 2 commits into
base: release/rocm-rel-6.3
Choose a base branch
from

Conversation

geotseng-amd
Copy link
Contributor

Cherry-pick from #1326, #1335


Summary

In this PR, we modified the runtime verifications to check if Alpha is in host memory.

Due to a modification from PR#956, the CPU may try to access device memory through Alpha, which violates the BIOS restrictions.

Assigned Ticket: https://ontrack-internal.amd.com/browse/SWDEV-496511
Caused Ticket: https://ontrack-internal.amd.com/browse/SWDEV-482839
Caused PR: #956

Modifications

In hipBLASLt API

HIPBLASLT_MATMUL_DESC_POINTER_MODE has three modes as the following:

typedef enum {
    HIPBLASLT_POINTER_MODE_HOST = 0,                          /** targets host memory */
    HIPBLASLT_POINTER_MODE_DEVICE = 1,                        /** targets device memory */
    HIPBLASLT_POINTER_MODE_ALPHA_DEVICE_VECTOR_BETA_HOST = 4, /** alpha pointer targets a device memory vector of length equal to the number of rows of matrix D, and beta is a single value in host memory. */
} hipblasLtPointerMode_t;

Only the HIPBLASLT_POINTER_MODE_HOST will ensure alpha is in host memory, so we modified validateMatmulArgs to check pointermode.

In hipBLASLtExt API

Since this ScaleAlphaVec is passed as a parameter through the API, we can simply push a nullptr as pointermode.

@geotseng-amd
Copy link
Contributor Author

All the local CI tests for PR#1356 are passed.

�[0;32m[----------] �[mGlobal test environment tear-down
�[0;32m[==========] �[m48206 tests from 13 test suites ran. (826691 ms total)
�[0;32m[ PASSED ] �[m48206 tests.
hipBLASLt version: 1000

command line: ./build/release/clients/staging/hipblaslt-test --gtest_output=xml --gtest_color=yes --gtest_repeat=1

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.

2 participants