Dynamic Compiler Internal Error in 1.0.0.030

Dynamic Compiler Internal Error in 1.0.0.030

Dear Array Building Blocks builders,

after a year since last time I looked into ArBB I decided to give it a new try.
I still think that the ArBB is an interesting one, and that it provides expressing algorithm in a clear way while at the same time being (very) fast at run-time.

My new attempt is a fail.
I got the code to compile and run with ARBB_EMULATE=1 but when I switch to ARBB_EMULATE=0 I receive an

Internal error: CTE_COMPILER_ERROR COMP_ERROR: Dynamic Compiler Internal Error

Question 1: in general, is it there a way to know directly which part creates the trouble ?

After doing some "comment out and test", I ended up identifying to the trouble-some piece of code:

dense difference = arbb::abs(left_column - right_column);
f32 sum_result = 0;
_for(usize i=0, i < column_length, ++i)
{
sum_result += difference[i]; // <<< this line is the problem
} _end_for

I initially had planned to do

f32 sum_result = arbb::sum(difference);

however doing so I receive an "reduction operation cannot be used within a map". Indeed this is the critical small part computation (column length ~ 100), done inside a larger call (~10 000 of instances doing the small columns sum of absolute difference) which I decided to map.

Question 2: how should I code my reduction ?

For now I would like to get the code running, after that indeed I would like to explore some different versions of my algorithm to see which one is the most performant, but right now even the "vanilla" approach is failing.

Comments welcome
(ArBB comments mention that internal_error should be reported...).

Best regards,
rodrigob.

4 post / 0 nuovi
Ultimo contenuto
Per informazioni complete sulle ottimizzazioni del compilatore, consultare l'Avviso sull'ottimizzazione
Ritratto di Noah Clemons (Intel)

Hi, since it has been a year, have you had a chance to read our knowledge base articles? I feel a map function approach would work better here. However, I don't see anyuse of the ArBB function interface in your sample. Remember that you must encapsulate everything inside an ArBB function and use the proper function signature in order for it to work. Please take a look at the sample codes on how ArBB functions are set up and used through call() or map(). Please read through the knowledge base articles that also go into more detail on the proper use of map()first - it should answer your questions. I'd rather not go into too much detail here because we spent so much time trying to cover all the bases in that article.

> Remember that you must encapsulate everything inside an ArBB function
and use the proper function signature in order for it to work.

As mentioned in my question I am only showing a small portion of the code (the portion that generates the bug). Also I do mention in the post (when introducing question 2) that the snippet is part of a map() call.

> Please read through the knowledge base articles that also go into more detail.

I did checkout the knowledge base (multiple times) before posting the question. I just double checked one more time.
I see no item that answers question 1 nor question 2.

When I search in Google the error message related to question 2 ("reduction operation cannot be used within a map") the only relevant answer I find is this same forum post !

Thus I believe these questions have a place in this forum, and a proper answer is most welcome.
Best regards,
rodrigob.

Ritratto di Noah Clemons (Intel)

Could you paste what *does* work, compiles, and runs and what does not? I'm trying to make sure that you've gotten an ArBB map function to work properly before and that this is some isolated case.

Accedere per lasciare un commento.