cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

Russian
Journeyman III

Context, Compiler, Linker etc.

Everithing about how to execute and link project

Hi All!

 

Esterday i have run my firs function and got success, but today i need more!

I have some questions about Compiler, likrer and Context functionality.

 

1. Is it possible to load more then one image to the context?

calModuleLoad(&module1, ctx, image1);

calModuleLoad(&module2, ctx, image2);

... etc

1.1 In the CAL example we have:     calModuleGetEntry(&func, ctx, module, "main");, but name of function is "il_ps_2_0". For what we need this name? Or it is not used of file contans only one function?

 

2. Is it possible to link input/outputs and constants between modules?

For example, input of one module, is an output of second? And is it possible to connect shared memory between module?

3. Is it possible to execute all functions from context as a list, and not to make a call of function by(calCtxRunProgram(...)) every time.

4. What is the overhead of calling?


5. I can read the result with DAM. Is it possible to write to the input buffer with DMA?

6. If i am defining constants for the function, is it possible to change this cinstants by calResMap, calResUnmap, when context executed?

 

7. Will come later. 🙂

 

Thanks,

Dmitry

0 Likes
4 Replies
Russian
Journeyman III

Additional question.

 

What shell i do, if i need an read/write arrey as parameter for a function, like FIR filter?

 

Thanks,

Dmitry

0 Likes

1) Currently only a single function can be loaded into a calModule, which must be named main.
2) Yes, just bind the module names to different calMem objects
3) yes, but only in Compute Shader, use calCtxRunProgramGridArray, but this will fail if the list does not fit in a single command buffer
4) In the amortized case it is around 7ms
5) When the data is copied to the board there are multiple ways of copying depending on memory constraints and sizes and how most efficiently CAL should copy
6) Yes but expect a performance hit to clear the constant caches

For read/write use the global buffer in pixel shader and uav/g[] in compute
0 Likes

Finaly i have got CS to work!

🙂

 

 

 

0 Likes

1. If multiple contexts will be created, then every context will have it's own image to execute. whether context switch will be noticible? Whether it is better solution then load module every time before start execution? (assuming only one image can be load per contexts, so to run the second IL image must be reloaded).

2. Whether the same resource can be attached to different contexts for i/o? (context1 for i, context2 for output)?

3. What is the example of running multiple functions in calCtxRunProgramGridArray if only one image can be loaded? If multiple ILs linked into the same image, what function names must be specified to run one after another, as sample says only about "main", what is declared implicitly?

4. Micah, in one of the posts you mentioned to use some input paramter to trigger between different function calls (code paths) from the "main", so all functionality will be linked together. In this case, whether non-executing paths will be scheduled (code branches which will not be executed) degrading performance?

 

0 Likes