input: input: (n, c), position: (n, nsample, c), weight : (n, nsample, c'), idx: (n, nsample) output: (n, c)
(ctx, input, position, weight, idx)
| 133 | class Aggregation(Function): |
| 134 | @staticmethod |
| 135 | def forward(ctx, input, position, weight, idx): |
| 136 | """ |
| 137 | input: input: (n, c), position: (n, nsample, c), weight : (n, nsample, c'), idx: (n, nsample) |
| 138 | output: (n, c) |
| 139 | """ |
| 140 | assert input.is_contiguous() and position.is_contiguous() and weight.is_contiguous() |
| 141 | n, nsample, c = position.shape; w_c = weight.shape[-1] |
| 142 | output = torch.cuda.FloatTensor(n, c).zero_() |
| 143 | pointops_cuda.aggregation_forward_cuda(n, nsample, c, w_c, input, position, weight, idx, output) |
| 144 | ctx.save_for_backward(input, position, weight, idx) |
| 145 | return output |
| 146 | |
| 147 | @staticmethod |
| 148 | def backward(ctx, grad_output): |
nothing calls this directly
no outgoing calls
no test coverage detected