MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / get_mask_size_in_bytes

Method get_mask_size_in_bytes

dnn/src/cuda/dropout/opr_impl.cpp:31–41  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

29};
30
31size_t DropoutForwardImpl::get_mask_size_in_bytes(const TensorLayout& inp) {
32 if (inp.is_empty()) {
33 return 0;
34 }
35
36 size_t reserve_space_size_in_bytes = 0;
37 DropoutTensorDesc ddesc(inp);
38 cudnn_check(
39 cudnnDropoutGetReserveSpaceSize(ddesc.desc, &reserve_space_size_in_bytes));
40 return reserve_space_size_in_bytes;
41}
42
43void DropoutForwardImpl::exec(
44 _megdnn_tensor_in inp, _megdnn_tensor_out oup, _megdnn_tensor_out mask,

Callers 5

run_dropoutFunction · 0.45
run_dropoutFunction · 0.45

Calls 1

is_emptyMethod · 0.45

Tested by 2

run_dropoutFunction · 0.36
run_dropoutFunction · 0.36