Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[math] Support more than 8 parameters of taichi gpu custom operator definition #642

Merged
merged 4 commits into from
Mar 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion brainpy/_src/math/jitconn/event_matvec.py
Original file line number Diff line number Diff line change
Expand Up @@ -1157,4 +1157,4 @@ def _define_event_mv_prob_normal_prim(cpu_kernel, gpu_kernel):
_event_mv_prob_normal_p = _define_event_mv_prob_normal_prim(
cpu_kernel=_event_mv_prob_normal_cpu,
gpu_kernel=_event_mv_prob_normal_gpu
)
)
9 changes: 5 additions & 4 deletions brainpy/_src/math/op_register/taichi_aot_based.py
Original file line number Diff line number Diff line change
Expand Up @@ -324,11 +324,12 @@ def _preprocess_kernel_call_gpu(
kernel_path = os.path.join(kernels_aot_path, source_md5_encode)

# other args
param_total_num = len(ins) + len(outs)
in_out_num = [len(ins), len(outs)]
in_out_type_list = [0] * 8
in_out_dim_count_list = [0] * 8
in_out_elem_count_list = [0] * 8
in_out_shape_list = [0] * 64
in_out_type_list = [0] * param_total_num
in_out_dim_count_list = [0] * param_total_num
in_out_elem_count_list = [0] * param_total_num
in_out_shape_list = [0] * param_total_num * 8

for i, value in enumerate(ins.values()):
in_out_type_list[i] = type_number_map[value[0]]
Expand Down
Loading