UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

取消
显示结果 
搜索替代 
您的意思是: 
Observer willyeyeball
Observer
172 次查看
注册日期: ‎12-21-2018

SDAccel Emulation-HW : terminate called without an active exception ?

Hi 您好 :

我呼叫 clCreateProgramWithBinary 此 API,

在 Emulation-HW 模式下, 編譯完執行Run,

總會出現 terminate called without an active exception

請問這是何原因呢 ?

該relaese的部份, 我覺得我都做了, 

這跟呼叫 clCreateProgramWithBinary 此 API 有關係嗎 ?

以下為 source code :

uint size = 0;
FILE *f = fopen(PROGRAM_FILE, "rb");
if (f == NULL) {
program_buffer = NULL;
return -1; // -1 means file opening fail
}
fseek(f, 0, SEEK_END);
size = ftell(f);
fseek(f, 0, SEEK_SET);
program_buffer = (char *)malloc(size+1);
if (size != fread(program_buffer, sizeof(char), size, f)) {
free(program_buffer);
return -2; // -2 means file reading fail
}
fclose(f);
program_buffer[size] = 0;
//free(program_buffer);


size_var = size;

/* Create program from file */
program = clCreateProgramWithBinary(context, 1, &device, &size_var,
(const unsigned char **) &program_buffer, &status, &err);
//printf("here0\n");
if(err < 0) {
//printf("here1\n");
perror("Couldn't create the program");
exit(1);
}
free(program_buffer);
//printf("here2\n");

Best Regards

willyeyeball

2018-12-21 13-06-30 的螢幕擷圖.png

0 项奖励
3 条回复
Observer willyeyeball
Observer
154 次查看
注册日期: ‎12-21-2018

回复: SDAccel Emulation-HW : terminate called without an active exception ?

Hi 您好:

在Emulation-SW模式 : clCreateProgramWithBinary() 可以呼叫成功,

在Emulation-HW模式 : clCreateProgramWithBinary() 呼叫會失敗,

請問這是為何呢?

Best Regards

willyeyeball

0 项奖励
Observer willyeyeball
Observer
151 次查看
注册日期: ‎12-21-2018

回复: SDAccel Emulation-HW : terminate called without an active exception ?

Hi 您好 :

我使用的作業系統是 Ubuntu 16.04

請問這有影響嗎 ?

Best Regards

willyeyeball

2018-12-21 14-55-58 的螢幕擷圖.png

 

0 项奖励
Observer willyeyeball
Observer
122 次查看
注册日期: ‎12-21-2018

回复: SDAccel Emulation-HW : terminate called without an active exception ?

Hi 您好:

Xilinx 提供的 Project "errors_ocl" 的 host.cpp 的 clCreateProgramWithBinary() API

在 Emulation-HW 模式下執行時就過不去了

請問這是為何呢 ?

Best Regards

willyeyeball

2018-12-21 18-17-12 的螢幕擷圖.png2018-12-21 18-23-36 的螢幕擷圖.png

0 项奖励