[driver] added spirv-llvm dispatch functions

This commit is contained in:
Philippe Tillet
2019-05-02 10:43:33 -04:00
parent 70f49a56c1
commit 208d1525de
4 changed files with 45 additions and 9 deletions

View File

@@ -103,7 +103,6 @@ int main() {
stream->write(da, true, 0, ha);
stream->write(db, true, 0, hb);
stream->write(dc, true, 0, hc);
stream->write(dlocks, true, 0, hlocks);
stream->synchronize();
@@ -116,6 +115,8 @@ int main() {
unsigned nthreads = info.num_threads;
unsigned GZ = jit.get_int("GZ");
std::array<size_t, 3> grid = {(M + TM - 1)/TM, (N + TN - 1)/TN, GZ};
// init locks
stream->write(dlocks, true, 0, hlocks);
// set argument
kernel->setArg(0, da);
kernel->setArg(1, db);