Download csrc/task_group_split.h from Cainiao-AI/GreedRL: direct link, hf CLI and curl.
- Browser
- Download file 750 Bytes
-
https://huggingface.co/Cainiao-AI/GreedRL/resolve/main/csrc/task_group_split.h
- Command line
-
hf download hf://Cainiao-AI/GreedRL/csrc/task_group_split.h
-
curl -L -o task_group_split.h https://huggingface.co/Cainiao-AI/GreedRL/resolve/main/csrc/task_group_split.h
750 Bytes
| /** | |
| * tasks are divided into groups, | |
| * if tasks in a group are all visited or all not visited, | |
| * output is is false, otherwise output is true | |
| * | |
| * group: task's group, shape is (batch_size, task_num) | |
| * value: task is visited or not, shape is (batch_size, task_num) | |
| * | |
| * output: the result, shape is (batch_size,) | |
| */ | |
| auto task_group_split(const Tensor& group, const Tensor& value) -> Tensor; | |
| void task_group_split_cpu( | |
| int* group, bool* value, bool* output, | |
| const int batch_size, const int task_num, const int group_num); | |
| void task_group_split_cuda( | |
| int* group, bool* value, bool* output, | |
| const int batch_size, const int task_num, const int group_num, const int device); | |