Skip to content
Permalink
Browse files

[conv/dnn] now created a separate .h and .cpp file

  • Loading branch information...
ptillet committed May 17, 2019
1 parent 34f8617 commit 600aef72d52474c47935e12f71a1bf0f852d7335
Showing with 562 additions and 529 deletions.
  1. +1 −11 examples/python/pytorch/conv.cpp
  2. +23 −518 include/triton/dnn/conv.h
  3. +538 −0 lib/dnn/conv.cpp
  4. 0 lib/frontend/jit.cpp
@@ -45,18 +45,8 @@ torch::Tensor conv_common(
// launch info
unsigned TM = info.global_range_size[0];
unsigned TN = info.global_range_size[1];
// initialize constant memory
if(ty != triton::dnn::conv::WGRAD){
std::vector<int> h_delta;
std::vector<int> h_masks;
configuration.build_deltas(h_delta);
configuration.build_masks(h_masks);
triton::driver::buffer* delta = jit.get_buffer("delta");
triton::driver::buffer* masks = jit.get_buffer("masks");
stream->write(delta, false, 0, h_delta.size()*4, h_delta.data());
stream->write(masks, false, 0, h_masks.size()*4, h_masks.data());
}
// launch info
configuration.init(stream, jit);
unsigned nthreads = info.num_threads;
std::array<size_t, 3> grid = configuration.get_grid(TM, TN);
configuration.set_arg(kernel, &a, &b, &c);

0 comments on commit 600aef7

Please sign in to comment.
You can’t perform that action at this time.