diff --git a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensor_cpu_runtime.h b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensor_cpu_runtime.h index 31214eaaa799d5cd8d4de5b0935b41aa7fce617d..4bb703bbd2596980fb4d930b36aaa749c7144044 100644 --- a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensor_cpu_runtime.h +++ b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensor_cpu_runtime.h @@ -1,3 +1,14 @@ +//===--------------------------- tensor_cpu_runtime.h -----------------------===// +// +//===----------------------------------------------------------------------===// +// +// This header file comprises of the API to the tensor routines for CPU. +// This also contains the interfaces to the approximated versions of tensor +// operations that are supported on CPU. +// +//===----------------------------------------------------------------------===// + + #include <stdio.h> #include <cstdlib> #include <cmath> diff --git a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensor_signatures.cc b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensor_signatures.cc index 7eb3afc62d9e24cb9f73720a2a522e42004fff57..323adbac8940ed83c51d3729565c1bda3dbf35cc 100644 --- a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensor_signatures.cc +++ b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/include/tensor_signatures.cc @@ -1,3 +1,13 @@ +//===--------------------------- tensor_signatures.cc -----------------------===// +// +//===----------------------------------------------------------------------===// +// +// This file contains the declarations of the API to the HPVM tensor runtime. +// This is compiled to LLVM bitcode file that is loaded by HPVM passes when +// tensor-based application are compiled through HPVM. +// +//===----------------------------------------------------------------------===// + #include "tensor_runtime.h" diff --git a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/approx_simulation.cu b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/approx_simulation.cu index 9a3c9ca848d443a20f1dcbb98fb3eda52ee15945..e9a4e50b000918c328a8b693f39c04505b6e4b79 100644 --- a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/approx_simulation.cu +++ b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/approx_simulation.cu @@ -2,7 +2,7 @@ // //===----------------------------------------------------------------------===// // -// This file consists of the simulation of implementation of software +// This file consists of the emulations of implementation of software // approximations for tensor convolutions. The approximations implemented are // feature sampling and perforation for FP32 and FP16 compute precisions. // diff --git a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/configuration.cpp b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/configuration.cpp index d9d598d2a64cd898bc6c2b51607e1fb92b9afb8a..7b8865966f03d838b2de1fe06339c4a8620870b1 100644 --- a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/configuration.cpp +++ b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/configuration.cpp @@ -1,3 +1,13 @@ +//===--------------------------- configuration.cpp -------------------------===// +// +//===----------------------------------------------------------------------===// +// +// This file consists of the definitions of API to get information about +// configurations for rest of the tensor runtime to use. +// +//===----------------------------------------------------------------------===// + + #include "configuration.h" using P_APPROX = PROMISENodeConfiguration::APPROX; diff --git a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/fp16_gemm.cu b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/fp16_gemm.cu index 1a42568784cc177783b2290a14c46068815e1632..4392839f7f6dbca8df4352a19fdd689d6f8e3d5e 100644 --- a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/fp16_gemm.cu +++ b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/fp16_gemm.cu @@ -1,4 +1,12 @@ - +//===--------------------------- fp16_gemm.cu -----------------------------===// +// +//===----------------------------------------------------------------------===// +// +// This file consists of the custom implementation of quantization kernels. +// This helps HPVM to switch compute precision for tensor operations between +// FP32 and FP16. +// +//===----------------------------------------------------------------------===// #ifndef FP16_UTILS_HEADER #define FP16_UTILS_HEADER diff --git a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/group_conv.cu b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/group_conv.cu index fd8a23b9cad89fe9ac6618e8c1b0e962ab27cf15..4b49a3702b1938ceed9829cc3572474c7cb82420 100644 --- a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/group_conv.cu +++ b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/group_conv.cu @@ -1,3 +1,13 @@ +//===--------------------------- group_conv.cu -----------------------------===// +// +//===----------------------------------------------------------------------===// +// +// This file group convolutions with FP16 and FP32 compute precisions. +// Note that group convolutions, unlike regular convolutions, are not +// approximable in any other way in HPVM. +// +//===----------------------------------------------------------------------===// + #include "tensor_utils.h" #include "fp16_gemm.h" diff --git a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/wrapper_runtime.cu b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/wrapper_runtime.cu index f9fee629e1192ee985064a5f968376d1381d9af9..3f433be855a762028d94d3871abc4d8971507c46 100644 --- a/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/wrapper_runtime.cu +++ b/hpvm/projects/hpvm-tensor-rt/tensor_runtime/src/wrapper_runtime.cu @@ -1,3 +1,12 @@ +//===--------------------------- wrapper_runtime.cu -----------------------===// +// +//===----------------------------------------------------------------------===// +// +// This file contains the implementation of some of the core API to tensor runtime +// so that runtime tuning of approximations can be done on different targets. +// +//===----------------------------------------------------------------------===// + #include <stdio.h> #include <cstdio>