You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tvm.apache.org by GitBox <gi...@apache.org> on 2020/09/05 11:18:13 UTC

[GitHub] [incubator-tvm-vta] liangfu commented on a change in pull request #9: [Hardware][OpenCL] Intelfocl support

liangfu commented on a change in pull request #9:
URL: https://github.com/apache/incubator-tvm-vta/pull/9#discussion_r483940899



##########
File path: hardware/intelfocl/src/vta.cl
##########
@@ -0,0 +1,360 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+#pragma OPENCL EXTENSION cl_intel_channels: enable
+
+#include "vta.h"
+
+__attribute__((reqd_work_group_size(1,1,1)))
+__kernel void vta_core(unsigned int insn_count,
+                       unsigned int insns_offset,
+                       __global insn_T* restrict insns,
+                       __global uop_T* restrict uops,
+                       __global acc_T* restrict biases,
+                       __global inp_T* restrict inputs,
+                       __global wgt_T* restrict weights,
+                       __global out_T* restrict outputs)
+{
+    /* Local Memories */
+    uop_T uop_mem[VTA_UOP_BUFF_DEPTH];

Review comment:
       Since most of C-like code in TVM follows Google C/C++ style, and to be consistent with other part of the code base, I think we should apply 2 spaces as indentation for OpenCL based hardware designs as well.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org