Reread Pinned-Host-Memory and host freeze

Discussion created by bijaer on Sep 14, 2010
Latest reply on Sep 21, 2010 by bijaer
Pinned Host Memory freeze

Hello community,

i've got a few questions about IL Kernels and pinned-host-memory access. i'm working for an kernel that is reading from an input buffer in a loop. In fact, the device should read the same buffer entry again and again while the host is altering that value. There is no synchronization needed, i only have to proof that the data is really "refreshed" at the device side.

Is this possible?

The Problem with our kernel is that the host totally freezes until the kernel is finished. Is it common that the host freezes during the runtime of the stream kernels?

I´m very glad if you can help me in any way ...

The kernel code is currently like this:
    // globals:
    "il_ps_2_0\n"                                // IL Version
    "dcl_input_position_interp(linear_noperspective) v0.xy__\n"                                  "dcl_resource_id(0)_type(2d,unnorm)_fmtx(unknown)_fmty(unknown)_fmtz(unknown)_fmtw(unknown)\n"
    "sample_resource(0)_sampler(0) r12, v0.xyxx\n"
    "dcl_output_generic o0\n"                             
    "dcl_literal l0, 0x0fffffff, 0x0000ffff, 0x00000000, 0x00000000\n" // l0.x maxLoops | l0.y idle-"time"
    "dcl_literal l1, 0x00000001, 0x00000001, 0x00000001, 0x00000001\n"
    "mov r16.x, l0.y\n"
    "mov o1, l0\n"
    // main loop:
        "ge r18.x___, r16.x, l0.x\n"               
        "break_logicalnz r18.x\n"                   
        "iadd r12.x___, r12.x, l1.x\n"   
        "call 4\n"                                        // idle
        "iadd r16.x___, r16.x, l1.x\n"                
    "mov o0, r12\n"                                // write to output
    // func 4: idle
    "func 4\n"
            "ge r19.x___, r17.x, l0.y\n"               
            "break_logicalnz r19.x\n"                  
            "iadd r17.x___, r17.x, l1.x\n"