[jit/autotune] added support for multi-threaded auto-tuning

This commit is contained in:
Philippe Tillet
2019-07-14 21:54:57 -07:00
parent 3e7a3ed67a
commit 3c128fc2e2
3 changed files with 81 additions and 58 deletions

View File

@@ -14,13 +14,13 @@ int main() {
// initialize default compute device
auto context = triton::driver::backend::contexts::get_default();
auto op = triton::dnn::shift::BPROP;
auto op = triton::dnn::shift::FPROP;
// initialization
int32_t R = 3, S = 3;
int32_t B = 16, F = 4096;
int32_t B = 16, F = 512;
int32_t H = 16, W = 16;
int32_t C = 4096;
int32_t C = 512;
// random shifts
std::vector<int32_t> shift_h(C);
@@ -66,7 +66,7 @@ int main() {
stream->write(db, true, 0, hb);
stream->write(dc, true, 0, hc);
stream->synchronize();
shift.enqueue(stream, {da, db, dc});
shift.enqueue(stream, {da, db, dc}, true);
// stream->read(dc, true, 0, hc);
// shift.cpu_ref(rc.data(), ha.data(), hb.data());
// for(size_t i = 0; i < hc.size(); i++)