Skip to content

Commit

Permalink
[conv/dnn] now created a separate .h and .cpp file
Browse files Browse the repository at this point in the history
  • Loading branch information
ptillet committed May 17, 2019
1 parent 34f8617 commit 600aef7
Show file tree
Hide file tree
Showing 4 changed files with 562 additions and 529 deletions.
12 changes: 1 addition & 11 deletions examples/python/pytorch/conv.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit 600aef7

Please sign in to comment.