Files
DS4Server/tests/fixtures/mtplx-silu-jit.json
T

2 lines
20 KiB
JSON

{"source_sha256":"76cafb45db55a91efba66503dde59b37628ea360f220f35dd860f4ac3c3d0111","kernels":"[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_contiguous\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_contiguous(\n device const bfloat16_t* A [[buffer(0)]],\n device bfloat16_t* B [[buffer(1)]],\n constant const uint& size [[buffer(2)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 1;\n uint index = N_ * pos.x;\n bfloat16_t tmp_A = A[index];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_contiguous_n\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_contiguous_n(\n device const bfloat16_t* A [[buffer(0)]],\n device bfloat16_t* B [[buffer(1)]],\n constant const uint& size [[buffer(2)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 4;\n uint index = N_ * pos.x;\n for (int i = 0; i < N_ && index < size; ++i) {\n bfloat16_t tmp_A = A[index];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index++;\n }\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_contiguous_large\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_contiguous_large(\n device const bfloat16_t* A [[buffer(0)]],\n device bfloat16_t* B [[buffer(1)]],\n constant const int64_t& size [[buffer(2)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 4;\n int64_t index = N_ * (pos.x + grid.x * int64_t(pos.y));\n for (int i = 0; i < N_ && index < size; ++i) {\n bfloat16_t tmp_A = A[index];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index++;\n }\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_1\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_1(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 1;\n uint index = pos.x + grid.x * (pos.y + uint(grid.y) * pos.z);\n uint index_A = elem_to_loc_1<uint>(pos.x, in_strides[0]);\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_1_large\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_1_large(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 1;\n int64_t index = pos.x + grid.x * (pos.y + int64_t(grid.y) * pos.z);\n int64_t index_A = elem_to_loc_1<int64_t>(pos.x, in_strides[0]);\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_2\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_2(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 1;\n uint index = pos.x + grid.x * (pos.y + uint(grid.y) * pos.z);\n uint index_A = elem_to_loc_2<uint>({pos.x, pos.y}, in_strides + 0);\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_2_large\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_2_large(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 1;\n int64_t index = pos.x + grid.x * (pos.y + int64_t(grid.y) * pos.z);\n int64_t index_A = elem_to_loc_2<int64_t>({pos.x, pos.y}, in_strides + 0);\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_3\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_3(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 1;\n uint index = pos.x + grid.x * (pos.y + uint(grid.y) * pos.z);\n uint index_A = elem_to_loc_3<uint>(pos, in_strides + 0);\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_3_large\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_3_large(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 1;\n int64_t index = pos.x + grid.x * (pos.y + int64_t(grid.y) * pos.z);\n int64_t index_A = elem_to_loc_3<int64_t>(pos, in_strides + 0);\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_4\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_4(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 2;\n int xshape = output_shape[3];\n uint index = N_ * pos.x + xshape * (pos.y + uint(grid.y) * pos.z);\n uint index_A = N_ * pos.x * uint(in_strides[3]) + pos.y * uint(in_strides[2]);\n uint zpos = pos.z;\n for (int d = 1; d >= 0; --d) {\n uint l = zpos % output_shape[d];\n index_A += l * uint(in_strides[0 + d]);\n zpos /= output_shape[d];\n }\n for (int i = 0; i < N_ && (int(N_ * pos.x) + i) < xshape; ++i) {\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index_A += in_strides[3];\n index++;\n }\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_4_large\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_4_large(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 4;\n int xshape = output_shape[3];\n int64_t index = N_ * pos.x + xshape * (pos.y + int64_t(grid.y) * pos.z);\n int64_t index_A = N_ * pos.x * int64_t(in_strides[3]) + pos.y * int64_t(in_strides[2]);\n uint zpos = pos.z;\n for (int d = 1; d >= 0; --d) {\n uint l = zpos % output_shape[d];\n index_A += l * int64_t(in_strides[0 + d]);\n zpos /= output_shape[d];\n }\n for (int i = 0; i < N_ && (int(N_ * pos.x) + i) < xshape; ++i) {\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index_A += in_strides[3];\n index++;\n }\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_5\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_5(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 2;\n int xshape = output_shape[4];\n uint index = N_ * pos.x + xshape * (pos.y + uint(grid.y) * pos.z);\n uint index_A = N_ * pos.x * uint(in_strides[4]) + pos.y * uint(in_strides[3]);\n uint zpos = pos.z;\n for (int d = 2; d >= 0; --d) {\n uint l = zpos % output_shape[d];\n index_A += l * uint(in_strides[0 + d]);\n zpos /= output_shape[d];\n }\n for (int i = 0; i < N_ && (int(N_ * pos.x) + i) < xshape; ++i) {\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index_A += in_strides[4];\n index++;\n }\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_5_large\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_5_large(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 4;\n int xshape = output_shape[4];\n int64_t index = N_ * pos.x + xshape * (pos.y + int64_t(grid.y) * pos.z);\n int64_t index_A = N_ * pos.x * int64_t(in_strides[4]) + pos.y * int64_t(in_strides[3]);\n uint zpos = pos.z;\n for (int d = 2; d >= 0; --d) {\n uint l = zpos % output_shape[d];\n index_A += l * int64_t(in_strides[0 + d]);\n zpos /= output_shape[d];\n }\n for (int i = 0; i < N_ && (int(N_ * pos.x) + i) < xshape; ++i) {\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index_A += in_strides[4];\n index++;\n }\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_6\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_6(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 2;\n int xshape = output_shape[5];\n uint index = N_ * pos.x + xshape * (pos.y + uint(grid.y) * pos.z);\n uint index_A = N_ * pos.x * uint(in_strides[5]) + pos.y * uint(in_strides[4]);\n uint zpos = pos.z;\n for (int d = 3; d >= 0; --d) {\n uint l = zpos % output_shape[d];\n index_A += l * uint(in_strides[0 + d]);\n zpos /= output_shape[d];\n }\n for (int i = 0; i < N_ && (int(N_ * pos.x) + i) < xshape; ++i) {\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index_A += in_strides[5];\n index++;\n }\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_6_large\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_6_large(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 4;\n int xshape = output_shape[5];\n int64_t index = N_ * pos.x + xshape * (pos.y + int64_t(grid.y) * pos.z);\n int64_t index_A = N_ * pos.x * int64_t(in_strides[5]) + pos.y * int64_t(in_strides[4]);\n uint zpos = pos.z;\n for (int d = 3; d >= 0; --d) {\n uint l = zpos % output_shape[d];\n index_A += l * int64_t(in_strides[0 + d]);\n zpos /= output_shape[d];\n }\n for (int i = 0; i < N_ && (int(N_ * pos.x) + i) < xshape; ++i) {\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index_A += in_strides[5];\n index++;\n }\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_7\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_7(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 2;\n int xshape = output_shape[6];\n uint index = N_ * pos.x + xshape * (pos.y + uint(grid.y) * pos.z);\n uint index_A = N_ * pos.x * uint(in_strides[6]) + pos.y * uint(in_strides[5]);\n uint zpos = pos.z;\n for (int d = 4; d >= 0; --d) {\n uint l = zpos % output_shape[d];\n index_A += l * uint(in_strides[0 + d]);\n zpos /= output_shape[d];\n }\n for (int i = 0; i < N_ && (int(N_ * pos.x) + i) < xshape; ++i) {\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index_A += in_strides[6];\n index++;\n }\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_7_large\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_7_large(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 4;\n int xshape = output_shape[6];\n int64_t index = N_ * pos.x + xshape * (pos.y + int64_t(grid.y) * pos.z);\n int64_t index_A = N_ * pos.x * int64_t(in_strides[6]) + pos.y * int64_t(in_strides[5]);\n uint zpos = pos.z;\n for (int d = 4; d >= 0; --d) {\n uint l = zpos % output_shape[d];\n index_A += l * int64_t(in_strides[0 + d]);\n zpos /= output_shape[d];\n }\n for (int i = 0; i < N_ && (int(N_ * pos.x) + i) < xshape; ++i) {\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index_A += in_strides[6];\n index++;\n }\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_dynamic\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_dynamic(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n constant const int& ndim [[buffer(4)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 2;\n int xshape = output_shape[ndim - 1];\n uint index = N_ * pos.x + xshape * (pos.y + uint(grid.y) * pos.z);\n uint index_A = N_ * pos.x * uint(in_strides[ndim * 0 + ndim - 1]) + pos.y * uint(in_strides[ndim * 0 + ndim - 2]);\n uint zpos = pos.z;\n for (int d = ndim - 3; d >= 0; --d) {\n uint l = zpos % output_shape[d];\n index_A += l * uint(in_strides[0 * ndim + d]);\n zpos /= output_shape[d];\n }\n for (int i = 0; i < N_ && (int(N_ * pos.x) + i) < xshape; ++i) {\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index_A += in_strides[0 * ndim + ndim - 1];\n index++;\n }\n}\n[[host_name(\"BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_dynamic_large\")]]\n[[kernel]] void BV2ISigmoidACV2IBroadcastABDV2IBroadcastBAEV2OMultiplyCD_V_V2_11160318154034397263_strided_dynamic_large(\n device const bfloat16_t* A [[buffer(0)]],\n constant const int64_t* in_strides [[buffer(1)]],\n device bfloat16_t* B [[buffer(2)]],\n constant const int* output_shape [[buffer(3)]],\n constant const int& ndim [[buffer(4)]],\n uint3 pos [[thread_position_in_grid]],\n uint3 grid [[threads_per_grid]]) {\n constexpr int N_ = 4;\n int xshape = output_shape[ndim - 1];\n int64_t index = N_ * pos.x + xshape * (pos.y + int64_t(grid.y) * pos.z);\n int64_t index_A = N_ * pos.x * int64_t(in_strides[ndim * 0 + ndim - 1]) + pos.y * int64_t(in_strides[ndim * 0 + ndim - 2]);\n uint zpos = pos.z;\n for (int d = ndim - 3; d >= 0; --d) {\n uint l = zpos % output_shape[d];\n index_A += l * int64_t(in_strides[0 * ndim + d]);\n zpos /= output_shape[d];\n }\n for (int i = 0; i < N_ && (int(N_ * pos.x) + i) < xshape; ++i) {\n bfloat16_t tmp_A = A[index_A];\n bfloat16_t tmp_C = Sigmoid()(tmp_A);\n bfloat16_t tmp_D = cast_to<bfloat16_t>(tmp_A);\n bfloat16_t tmp_E = cast_to<bfloat16_t>(tmp_C);\n bfloat16_t tmp_B = Multiply()(tmp_D, tmp_E);\n B[index] = tmp_B;\n index_A += in_strides[0 * ndim + ndim - 1];\n index++;\n }\n}\n"}