Skip to content

CPU Allocation #30

@Checkmate50

Description

@Checkmate50

It seems there is currently not a good way to allocate onto the CPU rather than the GPU with static buffer allocation. I've included example assembly that could maybe work for reference, but doesn't at the moment (assuming appropriate extras and the like):

value i64 @foo(%i : i64) {
    %y = call @op(%i);
    %z = extract %y 0;
    return %z;
}

timeline $event0 @time(%e : $event0) {
    %sub1 = submission-local->cpu %e;
    %sync1 = sync-local->cpu %sub1 %sub1;
    return %sync1;
}

schedule $slot_cpu @bar(%s : $slot_local, %buff : $buffer_cpu) {
    %2 = alloc-cpu-i64 %buff @foo.%i;
    %3 = encode-copy-cpu %s %2;
    %4 = alloc-cpu-i64 %buff @foo.%z;
    %5 = encode-do-cpu @foo.%y(%2) -> %4;
    %6 = submit-cpu @time.%sub1;
    %7 = encode-fence-cpu @time.%sub1;
    %8 = sync-fence-cpu %7 @time.%sync1;
    return %4;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions