[PyTorch] cuBLAS workspace size fix for TP overlap unit test #1415
+3
−3
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Ongoing work on PR #1337 exposed a bug in TP overlap where chunking/splitting a standard 32MiB cuBLAS workspace causes CUDA misaligned address error when cuBLAS dispatches an NVJET kernel for some (not all) GEMM sizes. Avoiding this misalignment requires the cuBLAS workspace allocation in the DL framework to be increased by a factor equal to the # of concurrent GEMM streams in TP overlap (i.e. 3 * 32MiB = 96 MiB for 3 concurrent streams).
Bootstrapping Userbuffers in
transformer_engine.pytorch.base.initialize_ub()
already accounts for this, but the pure GEMM unit test for TP overlap does not utilize this initialization. This PR corrects the workspace allocation in the pure GEMM unit test to avoid the misaligned address error in the CI.Fixes #1332
Type of change
Checklist: