Skip to content
This repository was archived by the owner on Apr 28, 2023. It is now read-only.

Commit 2334d73

Browse files
Allow up to 100 kernel parameters.
The following commit introduces an example where 20 parameters to cuda kernel calls are not enough.
1 parent e7cd425 commit 2334d73

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/core/cuda/cuda_rtc.cc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,9 @@ Duration CudaRTCFunction::Launch(
148148
specializedName.c_str()));
149149
}
150150

151-
std::array<void*, 20> args_voidp{0};
152-
CHECK_GE(20, params.size() + outputs.size() + inputs.size());
151+
constexpr int kNumMaxParameters = 100;
152+
std::array<void*, kNumMaxParameters> args_voidp{0};
153+
CHECK_GE(kNumMaxParameters, params.size() + outputs.size() + inputs.size());
153154
int ind = 0;
154155
for (auto& p : params) {
155156
args_voidp[ind++] = &p;

0 commit comments

Comments
 (0)