Skip to content

Instantly share code, notes, and snippets.

@ddemidov
Created September 25, 2014 07:06
Show Gist options
  • Save ddemidov/5391c79f36f2425c119e to your computer and use it in GitHub Desktop.
Save ddemidov/5391c79f36f2425c119e to your computer and use it in GitHub Desktop.
Backtrace
#include <iostream>
#include <vexcl/vexcl.hpp>
void bar() {
vex::Context ctx(vex::Filter::Env);
const size_t n = 1024;
vex::vector<int> x(ctx, n), y(ctx, n);
VEX_FUNCTION(int, baz, (int, idx),
return incomprehensible_gibberish(idx);
);
y = baz(x);
}
void foo() {
bar();
}
int main() {
foo();
}
#if defined(cl_khr_fp64)
# pragma OPENCL EXTENSION cl_khr_fp64: enable
#elif defined(cl_amd_fp64)
# pragma OPENCL EXTENSION cl_amd_fp64: enable
#endif
int baz
(
int idx
)
{
return incomprehensible_gibberish(idx);
}
kernel void vexcl_vector_kernel
(
ulong n,
global int * prm_1,
global int * prm_2
)
{
for(ulong idx = get_global_id(0); idx < n; idx += get_global_size(0))
{
prm_1[idx] = baz( prm_2[idx] );
}
}
ptxas application ptx input, line 59; error : Call has wrong number of parameters
ptxas fatal : Ptx assembly aborted due to errors
./hello-cl(_ZN3vex15print_backtraceEv+0x2a) [0x4ad6b1]
./hello-cl(_ZN3vex7backend6opencl13build_sourcesERKN2cl12CommandQueueERKSsS7_+0x3cf) [0x4ae3de]
./hello-cl(_ZN3vex7backend6opencl6kernelC1ERKN2cl12CommandQueueERKSsS8_mS8_+0x61) [0x4ae4d9]
./hello-cl() [0x4a8ffc]
./hello-cl() [0x4a862e]
./hello-cl(_Z3barv+0xd4) [0x4a843f]
./hello-cl(_Z3foov+0x9) [0x4a84c0]
./hello-cl(main+0x9) [0x4a84cb]
/lib64/libc.so.6(__libc_start_main+0xf5) [0x7f0f8fef2a65]
./hello-cl() [0x4a7cf9]
terminate called after throwing an instance of 'cl::Error'
what(): clBuildProgram
Aborted
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment