Save inference parity implementation and evaluation harness
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
[
|
||||
{
|
||||
"source_sha256": "15dd362325e0d9ea44a8646c29ed70c7f0ed53b1dcc9fe44b4f65fa4a11823e7",
|
||||
"kernels": "[[host_name(\"Fi4IBroadcastBGi4ISubtractAFHi4IBroadcastCIi4IMaximumGHJi4IMinimumIDKi4IBroadcastELi4OMinimumJK_VCCVC_i4i4_1937821606537560661_contiguous\")]]\n[[kernel]] void Fi4IBroadcastBGi4ISubtractAFHi4IBroadcastCIi4IMaximumGHJi4IMinimumIDKi4IBroadcastELi4OMinimumJK_VCCVC_i4i4_1937821606537560661_contiguous(\n device const int32_t* A [[buffer(0)]],\n device const int32_t* B [[buffer(1)]],\n device int32_t* C [[buffer(2)]],\n constant const uint& size [[buffer(3)]],\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 int32_t tmp_A = A[index];\n auto tmp_D = static_cast<int32_t>(1);\n auto tmp_E = static_cast<int32_t>(0);\n int32_t tmp_B = B[index];\n auto tmp_F = static_cast<int32_t>(1023);\n int32_t tmp_G = cast_to<int32_t>(tmp_D);\n int32_t tmp_H = Subtract()(tmp_A, tmp_G);\n int32_t tmp_I = cast_to<int32_t>(tmp_E);\n int32_t tmp_J = Maximum()(tmp_H, tmp_I);\n int32_t tmp_K = Minimum()(tmp_J, tmp_B);\n int32_t tmp_L = cast_to<int32_t>(tmp_F);\n int32_t tmp_C = Minimum()(tmp_K, tmp_L);\n C[index] = tmp_C;\n}\n"
|
||||
},
|
||||
{
|
||||
"source_sha256": "1cf792edbbd886d156b68f5082563d7335278c98ad8c996d547b19fd7cf125b0",
|
||||
"kernels": "[[host_name(\"Ci4IBroadcastBDi4OMultiplyAC_VC_i4_2169371982377735806_contiguous\")]]\n[[kernel]] void Ci4IBroadcastBDi4OMultiplyAC_VC_i4_2169371982377735806_contiguous(\n device const int32_t* A [[buffer(0)]],\n device int32_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 int32_t tmp_A = A[index];\n auto tmp_C = static_cast<int32_t>(4);\n int32_t tmp_D = cast_to<int32_t>(tmp_C);\n int32_t tmp_B = Multiply()(tmp_A, tmp_D);\n B[index] = tmp_B;\n}\n"
|
||||
},
|
||||
{
|
||||
"source_sha256": "48a7309664f797e749aa42d2c2c4db0cf3abedf97297f0068d06b7847d988b93",
|
||||
"kernels": "[[kernel]] void compute_dynamic_offset_int32(\n constant const int32_t* indices [[buffer(0)]],\n device int64_t& offset [[buffer(1)]],\n constant const int64_t* strides [[buffer(2)]],\n constant const int* axes [[buffer(3)]],\n constant const int& n_axes [[buffer(4)]],\n uint index [[thread_position_in_grid]]) {\n int64_t acc = 0;\n for (int i = 0; i < n_axes; ++i) {\n acc += indices[i] * strides[axes[i]];\n }\n offset = acc;\n }"
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user