Altera_Forum
Honored Contributor
8 years agoError: Assert failure at ... acl::ACLMemorySpaces::is_local_addrspace((cast<A
I touch attribute "autorun" in HelloWorld project, write OpenCL program:
global int i;
global int j;
__attribute__((max_global_work_dim(0)))
__attribute__((autorun))
__kernel void hello_world()
{
i = 0;
j = 1;
while (1) ;
} and fast see big ASSERT output in last Quartus version of aoc (16.1, 17.0):
Compiler Command: aoc -v device/hello_world.cl -o bin/hello_world.aocx
******* Error: Assert failure at d:/SJ/nightly/17.0/290/w64/p4/acl/llvm/lib/FPGAAnalysis/ACLMemoryDependenceAnalysis2.cpp(3543) *******
acl::ACLMemorySpaces::is_local_addrspace((cast<ACLMemInst>(I))->getPointerAddressSpace()) FAILED
Stack dump:
0. Program arguments: D:/intelFPGA_pro/17.0/hld/windows64/bin/aocl-opt --acle ljg7wk8o12ectgfpthjmnj8xmgf1qb17frkzwewi22etqs0o0cvorlvc
zrk7mipp8xd3egwiyx713svzw3kmlt8clxdbqoypaxbbyw0oygu1nsyzekh3nt0x0jpsmvypfxguwwdo880qqk8pachqllyc18a7q3wp12j7eqwipxw13swz1bp7tk71wyb3rb17frk
...
3ndpos3fcle0burjbtijz3gfuwwjz880qqkdoehdqlr8v0jpsmvpz3rj1wjdor2qmqw07akc -board c:/intelFPGA_pro/16.1/hld/board/alaric_hpc_16.1.2_b203_2ban
ks_256_stp/hardware/alaric_v3_prod_2banks_256/board_spec.xml -dbg-info-enabled --grif --soft-elementary-math=false --fas=false --wiicm-disa
ble=true hello_world.1.bc -o hello_world.kwgid.bc
1. Running pass 'Function Pass Manager' on module 'hello_world.1.bc'.
2. Running pass 'Pipeline Memory Dependence Analysis' on function '@hello_world'
0x000000013FEA8740 (0x00000000035F9870 0x0000000002BC9EE0 0x0000000002BDBF30 0x00000000035F9800)
0x0000000140364AB9 (0x0000000002BC9EE0 0x0000000002B6F750 0x0000000000000210 0x0000000000000000)
0x0000000140364C69 (0x0000000000000000 0x0000000000A6F901 0x0000000002B6F750 0x00000000034680C0)
0x0000000140364EDD (0x000000000000003A 0x0000000002F9E8E0 0x00000000000001D0 0x0000000000000000)
0x00000001403651E0 (0x000000000357F7F0 0x0000000000000998 0x0000000000000133 0x0000000000A6F940)
0x000000013F7FED58 (0x0000000000000001 0x0000001B3ED1F579 0x0000000000000001 0x0000000000000000)
0x00000001404EF0A6 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), ??4_Init_locks@std@@QEAAAEAV01@AEBV01@@Z(
) + 0x80A bytes(s)
0x00000000776959CD (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), BaseThreadInitThunk() + 0xD bytes(s)
0x00000000778CA561 (0x0000000000000000 0x0000000000000000 0x0000000000000000 0x0000000000000000), RtlUserThreadStart() + 0x21 bytes(s) If I declare and set to 0 only 1 of global variables "i" or "j", then .cl is compiled successfull, normal programmed to flash and runned on start of the my PC. Where are problem ? In Altera recomendations aocl_programming_guide.pdf I can`t find a restrictions for amount of global variables and setting to its on fly. In the standard opencl-1.0.pdf in section "6.5 Address Space Qualifiers" is quoted an example of using attribute "__global" for global variables:
__global int *p; These declaration in upper code is caused next compilation error:
... /device/hello_world.cl:21:15: error: global variables must have a constant or channel address space qualifier
__global int *p;
^
1 error generated.
Error: OpenCL parser FAILED.
Refer to hello_world/hello_world.log for details. Altera (and Intel) isn`t love and not test global variables in its version of Khronos OpenCL ?