forked from ccf-ai-infra/GPUCodeForces
finish ModSwish #114
This commit is contained in:
parent
76d09aaf92
commit
247a681616
|
|
@ -65,7 +65,7 @@ torch::Tensor modswish_cuda_forward(const torch::Tensor& input) {
|
|||
TORCH_CHECK(input.is_contiguous(), "Input must be contiguous");
|
||||
|
||||
const int n = input.numel();
|
||||
auto output = torch.empty_like(input);
|
||||
auto output = torch::empty_like(input);
|
||||
|
||||
const int vec_n = n / 4;
|
||||
const int grid_size = (vec_n + BLOCK_SIZE - 1) / BLOCK_SIZE;
|
||||
|
|
|
|||
Loading…
Reference in New Issue