Skip to content

Commit

Permalink
[GPU] Revert slice fusing
Browse files Browse the repository at this point in the history
  • Loading branch information
Lyamin-Roman committed Oct 14, 2024
1 parent ac96e15 commit 1b4faa6
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ KERNEL(slice_ref)(OPTIONAL_SHAPE_INFO_ARG
START_BUFFER
STEP_BUFFER
AXES_BUFFER
__global OUTPUT_TYPE* restrict output
#if HAS_FUSED_OPS_DECLS
, FUSED_OPS_DECLS
#endif
)
__global OUTPUT_TYPE* restrict output)
{
LOAD_BUFFER(START, start_buff);
LOAD_BUFFER(STEP, step_buff);
Expand Down Expand Up @@ -88,12 +84,7 @@ KERNEL(slice_ref)(OPTIONAL_SHAPE_INFO_ARG
slice_begin_dim4 + output_dim4 * slice_step[4]);
#endif

#if HAS_FUSED_OPS
FUSED_OPS;
output[output_index] = TO_OUTPUT_TYPE(FUSED_OPS_RESULT);
#else
output[output_index] = ACTIVATION(input[input_index], ACTIVATION_PARAMS);
#endif
}

#undef LOAD_BUFFER;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,16 +142,6 @@ JitConstants SliceKernelRef::GetJitConstants(const slice_params& params) const {
addJitConstantsForParam(jit, "START", params.compile_time_start, params.start_data_type, default_decorator);
addJitConstantsForParam(jit, "STEP", params.compile_time_step, params.step_data_type, default_decorator);

if (!params.fused_ops.empty()) {
std::vector<std::string> idx_order = {"b", "f", "y", "x"};
if (params.inputs[0].GetDims().size() == 5) {
idx_order = {"b", "f", "z", "y", "x"};
}

FusedOpsConfiguration conf = { "", idx_order, "input[input_index]", params.inputs[0].GetDType() };
jit.Merge(MakeFusedOpsJitConstants(params, {conf}));
}

return jit;
}

Expand Down

0 comments on commit 1b4faa6

Please sign in to comment.