You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
20 // Define the kernel
21 __global__ void solve_kernel(problem_instance_t *problem_instances, uint32_t instance_count) {
22 // Create a CGBN context
23 cgbn_error_report_t *report = cgbn_error_report_alloc();
24 cgbn_context_t<TPI> bn_context(cgbn_error_report_alloc(), report);
25 // Construct a bn environment for 256-bit math
26 typedef cgbn_env_t<cgbn_context_t<TPI>, 256> env256_t;
27 env256_t bn256_env(bn_context);
28 // Define 256-bit values
29 env256_t::cgbn_t c, p, temp, Z_val, N_val;
30
31 int32_t my_instance = (blockIdx.x * blockDim.x + threadIdx.x) / TPI; // Determine instance number
32 if (my_instance >= instance_count) return; // Return if instance is not valid
Compiling error:
test3.cu(23): error: too few arguments in function call
test3.cu(24): error: too few arguments in function call
What I found in examples and source codes for CGBN: cudaError_t cgbn_error_report_alloc(cgbn_error_report_t **report);
What am I missing ?
The text was updated successfully, but these errors were encountered:
hiddenvs
changed the title
CGBN context creatopm and Too few arguments in function call
CGBN context creation and Too few arguments in function call
Sep 25, 2024
As a heads up this project is unstaffed and support for it is extremely limited. With that said it looks like this error message is because you are not using cgbn_error_report_alloc() correctly. Have you looked at the examples? It also looks like you might be using host functions on the device. You will notice in the example pasted below this function is called from the host and takes an object by reference which gets allocated. You then pass this to the device via a kernel argument.
Part of source code:
Compiling error:
What I found in examples and source codes for CGBN:
cudaError_t cgbn_error_report_alloc(cgbn_error_report_t **report);
What am I missing ?
The text was updated successfully, but these errors were encountered: