Skip to content

Instantly share code, notes, and snippets.

View emfomenk's full-sized avatar
💭
dango dango

Evarist emfomenk

💭
dango dango
  • Hillsboro, Oregon
View GitHub Profile
diff --git a/src/cpu/jit_avx512_common_conv_kernel.cpp b/src/cpu/jit_avx512_common_conv_kernel.cpp
index 6414495..7104423 100644
--- a/src/cpu/jit_avx512_common_conv_kernel.cpp
+++ b/src/cpu/jit_avx512_common_conv_kernel.cpp
@@ -2672,12 +2672,14 @@ bool jit_avx512_common_conv_bwd_weights_kernel_f32::flat_4ops_compute() {
}
for (int ow = 0; ow < j.ow; ow += 4) {
- for (int _ow = ow; _ow < ow + 4; ++_ow) {
+ for (int _ow = ow; /*_ow < ow + 4*/; ++_ow) {
@emfomenk
emfomenk / patch
Created December 12, 2017 16:18
disabling openmp
diff --git a/CMakeLists.txt b/CMakeLists.txt
index be53786f..70e705f1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -54,7 +54,7 @@ if("${CMAKE_BUILD_TYPE}" STREQUAL "")
endif()
include("cmake/platform.cmake")
-include("cmake/OpenMP.cmake")
+# include("cmake/OpenMP.cmake")
@emfomenk
emfomenk / .patch
Last active February 21, 2018 19:54
Enable collapse omp clause on Windows for Intel Complier
commit 8846ac7035f275fc095d8e534aaf0549e41d6dff
Author: Fomenko, Evarist M <evarist.m.fomenko@intel.com>
Date: Wed Feb 21 18:49:03 2018 +0000
win: use collapse pragma for intel compiler
diff --git a/src/common/mkldnn_thread.hpp b/src/common/mkldnn_thread.hpp
index d97c665c..228ce37c 100644
--- a/src/common/mkldnn_thread.hpp
+++ b/src/common/mkldnn_thread.hpp
@emfomenk
emfomenk / strange_concepts.cpp
Last active March 13, 2018 16:28
Strange behavior of g++ w/ concepts
#include <stdio.h>
#include <vector>
#define D(v) printf("[%s:%d] %d\n", __PRETTY_FUNCTION__, __LINE__, v)
#if STRANGE_CONCEPTS
template <typename Src, typename Dst>
concept bool VectorSource()
{ return true; }
commit 0e73f66fa10dc07961b1b05697e716471b11eb41 (HEAD -> x)
Author: Fomenko, Evarist M <empty@empty.com>
Date: Mon Jul 23 11:39:16 2018 +0700
src: cpu: ncsp bnorm bwd: keep threading params up-to-date
diff --git a/src/cpu/ncsp_batch_normalization.cpp b/src/cpu/ncsp_batch_normalization.cpp
index 1bd7f6a9..1ba1be01 100644
--- a/src/cpu/ncsp_batch_normalization.cpp
+++ b/src/cpu/ncsp_batch_normalization.cpp
From b4ad9810802cf93b736481a0dfa3dbdf1b5a6fde Mon Sep 17 00:00:00 2001
From: "Fomenko, Evarist M" <evarist.m.fomenko@intel.com>
Date: Fri, 24 Aug 2018 17:47:47 +0000
Subject: [PATCH] cpu: softmax: initialize max with -FLT_MAX instead of 0
this fixes #106
---
src/cpu/ref_softmax.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
@emfomenk
emfomenk / deconv.cpp
Last active November 28, 2018 12:19
simple deconv w/ groups
#include <stdio.h>
#include <mkldnn.hpp>
using namespace mkldnn;
int main() {
auto cpu_engine = engine(engine::cpu, 0);
std::vector<float> src = {1, 2, -1, -2};
std::vector<float> wei = {10, 2, 1, 10, 100, 1, 3, 100};
@emfomenk
emfomenk / 0001-api-add-iohw-and-giohw-formats.patch
Created November 28, 2018 11:37
Adding iohw and giohw formats
From b401946179eba2675b35562f8457bc1424b5878d Mon Sep 17 00:00:00 2001
From: "Fomenko, Evarist M" <evarist.m.fomenko@intel.com>
Date: Wed, 28 Nov 2018 03:13:53 -0800
Subject: [PATCH] api: add iohw and giohw formats
These formats are useful for user weights format in deconvolution.
For instance in PyTorch weights for convolution are kept in `oihw`
and `goihw` formats for groups = 1 and groups > 1 case respectively.
But weights for deconvolution are kept in `iohw` and `giohw` formats
for groups = 1 and groups > 1 respecitively.
@emfomenk
emfomenk / example_bnrm_fwd.cpp
Created December 18, 2018 13:08
Simple batch normalization example
#include <stdio.h>
#include <math.h>
#include "mkldnn.hpp"
using namespace mkldnn;
void init_data(float *dat, int size) {
for (int i = 0; i < size; ++i)
dat[i] = 1.f + 2.f * sinf(0.2 * i);
@emfomenk
emfomenk / cpp_concat.cpp
Last active March 20, 2019 09:11
Simple concat example
#include <stdio.h>
#include "mkldnn.hpp"
using namespace mkldnn;
using format = mkldnn::memory::format;
void init_data(float *dat, int size, float v) {
for (int i = 0; i < size; ++i) dat[i] = v;
}