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

Reintroduce support for GPUs with Compute Capability 5.0 #1766

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -478,6 +478,8 @@ if (WITH_CUDA)
# Keep deprecated but not yet dropped Compute Capabilities.
if(CUDA_VERSION_MAJOR EQUAL 11)
list(INSERT CUDA_ARCH_LIST 0 "3.5" "5.0")
elseif(CUDA_VERSION_MAJOR EQUAL 12)
list(INSERT CUDA_ARCH_LIST 0 "5.0")
endif()
list(REMOVE_DUPLICATES CUDA_ARCH_LIST)
endif()
Expand Down
4 changes: 4 additions & 0 deletions src/ops/awq/dequantize_gpu.cu
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ namespace ctranslate2 {
int in_c,
int out_c)
{
#if defined(__CUDA_ARCH__) && __CUDA_ARCH__ < 530
assert(false);
#else
if (blockIdx.z > 0) {
B = B + blockIdx.z * in_c * out_c / 8;
scaling_factors = scaling_factors + blockIdx.z * in_c * out_c / G;
Expand Down Expand Up @@ -60,6 +63,7 @@ namespace ctranslate2 {
for (int i=0; i<8; ++i) {
*(C_ptr2 + i) = B_shared[i];
}
#endif
}

template <Device D, typename InT, typename OutT>
Expand Down
Loading