Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPU Allocation #30

Open
Checkmate50 opened this issue Feb 13, 2023 · 0 comments
Open

CPU Allocation #30

Checkmate50 opened this issue Feb 13, 2023 · 0 comments

Comments

@Checkmate50
Copy link
Contributor

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;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant