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
[ROCm] Adding Cuda Alias to Gpu functions #28343
[ROCm] Adding Cuda Alias to Gpu functions #28343
Conversation
I don't have the expertise to review this; removing myself. |
5f09d2c
to
6223014
Compare
6223014
to
8652f82
Compare
Will post back to address review feedback after PR439 approved. Will also integrate macro only change from GPU_LAUNCH_KERNEL to GpuLaunchKernel |
bff8831
to
0f07388
Compare
The on-going effort in commit d8d67ef to achieve the same goal with this PR seems to be duplicated, and is creating hard-to-resolve conflicts with this PR. Commit d8d67ef used a less desirable way to create aliases - manually copy and rename every function signature. Compared to the approach of creating dedicated macro to perfect forward function name, the commit looks hard to maintain and error prone. Could you help contact the internal contributor make sure our opinion on the same page with this PR? @chsigg @mrry @rthadur |
Hi Zhuoran. I started the rename from our side, sorry that I didn't look more carefully at your approach first. Generally, please do not mix several changes into the same PR. It makes it hard to understand and review. |
@chsigg No worries, good feedback on breaking the PR. Please prioritize following reviews:
Then the dependent ones:
The final goal of closing the large PR. |
The --config=rocm build was broken by the merge for PR tensorflow#26840 This commit backs out the ROCm support in the file avgpooling_op.cc (added by the above PR). This is because the the template instantiations required for GPU support of the average pooling operator (which are in avgpooling_op_gpu.cu.cc) also need to be enabled for ROCm at the same time (as the code in avgpooling_op.cc) in order to avoid link errors with the `--config=rocm` build. Enabling ROCm support for the code in avgpooling_op_gpu.cu.cc requires other PRs (the set spwaned from PR tensorflow#28343) to be merged first. Once those PRs are merged, we will file another PR to re-enable ROCm support in the avgpooling*.cc files.
Imported from GitHub PR #28565 This PR is a follow-up to the original PR #28343. The reviewer requested to break down the original large PR to a series of smaller ones. According to the plan here, this PR is the fifth one in the whole series. @chsigg @whchung Copybara import of the project: - c4756f5 Creating GpuLaunchKernel by zhuoryin <zhuoryin@amd.com> - bd98ac6 Merge c4756f5 into b5170... by Zhuoran Yin <jerryyin@users.noreply.github.com> COPYBARA_INTEGRATE_REVIEW=#28565 from ROCmSoftwarePlatform:google-upstream-pr-GpuLaunchKernel c4756f5 PiperOrigin-RevId: 248006235
Closing the review as all sub-PRs are merged |
This PR is a follow-up to PR #24293. This PR depends on & includes code changes from PR #28116. Code updates for this PR are in the
tensorflow/core/util
pathThrough utility functions defined in gpu_cuda_alias.h, this PR provides a Cuda* alias to existing Gpu* functions. The reason for this PR is to create backward compatibility to both the TensorFlow master branch as well as ROCm's develop-upstream branch. It allows TensorFlow master branch to slowly deprecate Cuda* aliased function, to the final goal of using GPU as the prefix to unify both Cuda and ROCm builds. All aliasing is done through perfect forwarding macro so that it is easy to maintain/take out.
Tests performed: Both Cuda/ROCm build successfully in both master and develop-upstream branch.
@whchung @deven-amd