- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am installing Caffe but want to use FPGA acceleration instead of GPU. However, I get an error when compiling.
I am assuming that Altera's aoc doesn't handle templates (yet). Anyway around this? templates coming soon? already there but "template __attribute" template <class T> __kernel void BNLLForward(const int n, __global const T* in, __global T* out) { int index = get_global_id(0); if (index < n) { out[index] = in[index] > 0 ? in[index] + log(1. + exp(-in[index])) : log(1. + exp(in[index])); } } template __attribute__((mangled_name(BNLLForward_float))) __kernel void BNLLForward(const int n, __global const float* in, __global float* out); template __attribute__((mangled_name(BNLLForward_double))) __kernel void BNLLForward(const int n, __global const double* in, __global double* out); ========yields the following errors========== /home/poz/altera/Caffe/OpenCL-caffe-stable/src/caffe/ocl/bnll_layer.cl:29:1: error: unknown type name 'template' template <class T> ^ /home/poz/altera/Caffe/OpenCL-caffe-stable/src/caffe/ocl/bnll_layer.cl:37:1: error: unknown type name 'template' template __attribute__((mangled_name(BNLLForward_double))) __kernel void BNLLForward(const int n, __global const double* in, __global double* out); ^ Thanks in advance (I hope) Dan..Link Copied
0 Replies

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page