23 #include "mkldnn_config.h" 25 #ifndef DOXYGEN_SHOULD_SKIP_THIS 29 #include <unordered_map> 35 #if MKLDNN_GPU_RUNTIME == MKLDNN_RUNTIME_OCL 53 struct error:
public std::exception {
62 : status(astatus), message(amessage) {}
65 const char *
what() const noexcept
override {
return message; }
74 throw error(status, message);
94 template <
typename T,
typename traits=handle_traits<T>>
class handle {
98 std::shared_ptr<typename std::remove_pointer<T>::type> _data;
102 bool operator==(
const T other)
const {
return other == _data.
get(); }
103 bool operator!=(
const T other)
const {
return !(*
this == other); }
108 handle(T t,
bool weak =
false): _data(0) {
131 void reset(T t,
bool weak =
false) {
132 _data.reset(t, weak ? &dummy_destructor : traits::destructor);
136 T
get(
bool allow_emtpy =
false)
const {
137 T result = _data.get();
139 if (allow_emtpy ==
false && result ==
nullptr)
141 "attempt to use uninitialized object");
146 bool operator==(
const handle &other)
const {
return other._data.get() == _data.get(); }
147 bool operator!=(
const handle &other)
const {
return !(*
this == other); }
150 #ifndef DOXYGEN_SHOULD_SKIP_THIS 171 struct primitive_desc;
219 void execute(
stream &astream,
220 const std::unordered_map<int, memory> &args)
const;
230 "could not get primitive descriptor by primitive");
283 undef = mkldnn_alg_kind_undef,
396 enum class rnn_flags : unsigned {
397 undef = mkldnn_rnn_flags_undef
405 #define MKLDNN_DEFINE_BITMASK_OPS(enum_name) \ 406 inline enum_name operator|(enum_name lhs, enum_name rhs) { \ 407 return static_cast<enum_name>( \ 408 static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); \ 411 inline enum_name operator&(enum_name lhs, enum_name rhs) { \ 412 return static_cast<enum_name>( \ 413 static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); \ 416 inline enum_name operator^(enum_name lhs, enum_name rhs) { \ 417 return static_cast<enum_name>( \ 418 static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); \ 421 inline enum_name& operator|=(enum_name &lhs, enum_name rhs) { \ 422 lhs = static_cast<enum_name>( \ 423 static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); \ 427 inline enum_name& operator&=(enum_name &lhs, enum_name rhs) { \ 428 lhs = static_cast<enum_name>( \ 429 static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); \ 433 inline enum_name& operator^=(enum_name &lhs, enum_name rhs) { \ 434 lhs = static_cast<enum_name>( \ 435 static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); \ 439 inline enum_name operator~(enum_name rhs) { \ 440 return static_cast<enum_name>(~static_cast<unsigned>(rhs)); \ 444 MKLDNN_DEFINE_BITMASK_OPS(rnn_flags)
446 #undef MKLDNN_DEFINE_BITMASK_OPS 448 enum class rnn_direction {
451 unidirectional = mkldnn_unidirectional,
551 #ifndef DOXYGEN_SHOULD_SKIP_THIS 565 "could not create post operation sequence");
576 "post_ops index is out of range");
603 "could not append sum");
610 "could not get sum params");
624 convert_to_c(alg), alpha, beta),
625 "could not append eltwise");
630 float &alpha,
float &beta)
const {
633 &scale, &c_alg, &alpha, &beta),
634 "could not get eltwise params");
639 #ifndef DOXYGEN_SHOULD_SKIP_THIS 653 "could not create a primitive attr");
661 get(), &result),
"could not get scratchpad mode");
668 get(), mkldnn::convert_to_c(mode)),
669 "could not set scratchpad mode");
677 const float *c_scales;
679 &count, &c_mask, &c_scales),
680 "could not get int output scales");
681 scales.resize(count);
685 scales[c] = c_scales[c];
706 "could not set int output scales");
714 "could not get post operation sequence");
715 result.
reset(const_cast<mkldnn_post_ops_t>(c_result),
true);
722 "could not set post operation sequence");
735 scale, shift),
"could not set rnn data int scale/shift");
763 (
int)scales.size(), mask, &scales[0]),
764 "could not set rnn weights int scales");
776 #ifndef DOXYGEN_SHOULD_SKIP_THIS 815 convert_to_c(akind), index),
816 "could not create an engine");
820 #if MKLDNN_GPU_RUNTIME == MKLDNN_RUNTIME_OCL 821 engine(
kind akind, cl_device_id device, cl_context context) {
826 convert_to_c(akind), device, context),
827 "could not create an engine");
834 :
handle(aengine, true) {}
843 "could not get engine from primitive_desc");
844 reset(engine_q,
true);
851 "could not get the engine kind");
855 #if MKLDNN_GPU_RUNTIME == MKLDNN_RUNTIME_OCL 856 cl_context get_ocl_context()
const {
858 cl_context context =
nullptr;
860 "could not get a context handle");
865 cl_device_id get_ocl_device()
const {
866 cl_device_id device =
nullptr;
868 "could not get a device handle");
874 template <
class primitive_desc>
875 static engine query(
const primitive_desc &pd) {
880 "could not get engine from primitive_desc");
882 return engine(engine_q);
899 #ifndef DOXYGEN_SHOULD_SKIP_THIS 930 "could not create a stream");
934 #if MKLDNN_GPU_RUNTIME == MKLDNN_RUNTIME_OCL 940 "could not create a stream");
945 cl_command_queue get_ocl_command_queue()
const {
946 cl_command_queue queue =
nullptr;
948 "could not get OpenCL command queue");
957 "could not wait a stream");
964 static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs));
969 static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs));
974 static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs));
978 return static_cast<stream::flags>(~static_cast<
unsigned>(rhs));
995 typedef std::vector<dim> dims;
997 template <
typename T>
static void validate_dims(
const std::vector<T> &v) {
1077 Abc16a = mkldnn_Abc16a,
1078 ABc16a16b = mkldnn_ABc16a16b,
1080 ABc16b16a = mkldnn_ABc16b16a,
1081 Abc4a = mkldnn_Abc4a,
1083 ABc4b16a4b = mkldnn_ABc4b16a4b,
1084 ABc4b4a = mkldnn_ABc4b4a,
1085 ABc8a16b2a = mkldnn_ABc8a16b2a,
1086 ABc8a8b = mkldnn_ABc8a8b,
1088 ABc8b16a2b = mkldnn_ABc8b16a2b,
1089 ABc8b8a = mkldnn_ABc8b8a,
1090 Abcd16a = mkldnn_Abcd16a,
1091 ABcd16a16b = mkldnn_ABcd16a16b,
1093 ABcd16b16a = mkldnn_ABcd16b16a,
1094 aBCd16b16c = mkldnn_aBCd16b16c,
1095 aBCd16c16b = mkldnn_aBCd16c16b,
1096 Abcd4a = mkldnn_Abcd4a,
1098 ABcd4b16a4b = mkldnn_ABcd4b16a4b,
1099 ABcd4b4a = mkldnn_ABcd4b4a,
1100 aBCd4c16b4c = mkldnn_aBCd4c16b4c,
1101 aBCd4c4b = mkldnn_aBCd4c4b,
1102 ABcd8a16b2a = mkldnn_ABcd8a16b2a,
1103 ABcd8a8b = mkldnn_ABcd8a8b,
1106 ABcd8b16a2b = mkldnn_ABcd8b16a2b,
1107 aBCd8b16c2b = mkldnn_aBCd8b16c2b,
1110 aBCd8b8c = mkldnn_aBCd8b8c,
1111 aBCd8c16b2c = mkldnn_aBCd8c16b2c,
1112 aBCd8c8b = mkldnn_aBCd8c8b,
1113 Abcde16a = mkldnn_Abcde16a,
1114 ABcde16a16b = mkldnn_ABcde16a16b,
1116 ABcde16b16a = mkldnn_ABcde16b16a,
1117 aBCde16b16c = mkldnn_aBCde16b16c,
1118 aBCde16c16b = mkldnn_aBCde16c16b,
1119 aBCde2c8b4c = mkldnn_aBCde2c8b4c,
1120 Abcde4a = mkldnn_Abcde4a,
1122 ABcde4b4a = mkldnn_ABcde4b4a,
1123 aBCde4b4c = mkldnn_aBCde4b4c,
1124 aBCde4c16b4c = mkldnn_aBCde4c16b4c,
1125 aBCde4c4b = mkldnn_aBCde4c4b,
1126 Abcde8a = mkldnn_Abcde8a,
1127 ABcde8a8b = mkldnn_ABcde8a8b,
1129 ABcde8b16a2b = mkldnn_ABcde8b16a2b,
1130 aBCde8b16c2b = mkldnn_aBCde8b16c2b,
1131 ABcde8b8a = mkldnn_ABcde8b8a,
1132 aBCde8b8c = mkldnn_aBCde8b8c,
1133 ABcd4a8b8a4b = mkldnn_ABcd4a8b8a4b,
1134 ABcd2a8b8a2b = mkldnn_ABcd2a8b8a2b,
1135 aBCde4b8c8b4c = mkldnn_aBCde4b8c8b4c,
1136 aBCde2b8c8b2c = mkldnn_aBCde2b8c8b2c,
1137 aBCde8c16b2c = mkldnn_aBCde8c16b2c,
1138 aBCde8c8b = mkldnn_aBCde8c8b,
1140 aBCdef16b16c = mkldnn_aBCdef16b16c,
1141 aBCdef16c16b = mkldnn_aBCdef16c16b,
1143 aBCdef4c4b = mkldnn_aBCdef4c4b,
1144 aBCdef8b8c = mkldnn_aBCdef8b8c,
1145 aBCdef8c16b2c = mkldnn_aBCdef8c16b2c,
1146 aBCdef8c8b = mkldnn_aBCdef8c8b,
1147 aBdc16b = mkldnn_aBdc16b,
1148 aBdc4b = mkldnn_aBdc4b,
1149 aBdc8b = mkldnn_aBdc8b,
1150 aBdec16b = mkldnn_aBdec16b,
1151 aBdec4b = mkldnn_aBdec4b,
1152 aBdec8b = mkldnn_aBdec8b,
1153 aBdefc16b = mkldnn_aBdefc16b,
1154 aCBdef16c16b = mkldnn_aCBdef16c16b,
1155 aBdefc4b = mkldnn_aBdefc4b,
1156 aBdefc8b = mkldnn_aBdefc8b,
1157 Acb16a = mkldnn_Acb16a,
1158 Acb4a = mkldnn_Acb4a,
1159 Acb8a = mkldnn_Acb8a,
1160 aCBd16b16c = mkldnn_aCBd16b16c,
1161 aCBd16c16b = mkldnn_aCBd16c16b,
1162 aCBde16b16c = mkldnn_aCBde16b16c,
1163 aCBde16c16b = mkldnn_aCBde16c16b,
1164 Acdb16a = mkldnn_Acdb16a,
1165 Acdb4a = mkldnn_Acdb4a,
1166 Acdb8a = mkldnn_Acdb8a,
1167 Acdeb16a = mkldnn_Acdeb16a,
1168 Acdeb4a = mkldnn_Acdeb4a,
1169 Acdeb8a = mkldnn_Acdeb8a,
1170 BAc16a16b = mkldnn_BAc16a16b,
1171 BAc16b16a = mkldnn_BAc16b16a,
1172 BAcd16a16b = mkldnn_BAcd16a16b,
1173 BAcd16b16a = mkldnn_BAcd16b16a,
1174 ABcd32a32b = mkldnn_ABcd32a32b,
1175 BAcde16b16 = mkldnn_BAcde16b16a,
1176 aBdec32b = mkldnn_aBdec32b,
1177 Abcdef16a = mkldnn_Abcdef16a,
1178 Acdb32a = mkldnn_Acdb32a,
1229 NCw16n16c = mkldnn_NCw16n16c,
1230 NChw16n16c = mkldnn_NChw16n16c,
1231 NCdhw16n16c = mkldnn_NCdhw16n16c,
1232 NChw32n32c = mkldnn_NChw32n32c,
1233 IOhw16i16o = mkldnn_IOhw16i16o,
1234 Ohwi32o = mkldnn_Ohwi32o,
1235 IOdhw16i16o = mkldnn_IOdhw16i16o,
1236 gIOhw16i16o = mkldnn_gIOhw16i16o,
1237 gOhwi32o = mkldnn_gOhwi32o,
1238 Goidhw16g = mkldnn_Goidhw16g,
1239 IOw16o16i = mkldnn_IOw16o16i,
1240 OIw16i16o = mkldnn_OIw16i16o,
1241 IOw16i16o = mkldnn_IOw16i16o,
1242 gIOw16i16o = mkldnn_gIOw16i16o,
1243 OIw16o16i = mkldnn_OIw16o16i,
1244 Oiw16o = mkldnn_Oiw16o,
1245 OIw4i16o4i = mkldnn_OIw4i16o4i,
1246 OIw4i4o = mkldnn_OIw4i4o,
1247 Oiw4o = mkldnn_Oiw4o,
1248 OIw8i16o2i = mkldnn_OIw8i16o2i,
1249 OIw8i8o = mkldnn_OIw8i8o,
1250 OIw8o16i2o = mkldnn_OIw8o16i2o,
1251 OIw8o8i = mkldnn_OIw8o8i,
1252 Owi16o = mkldnn_Owi16o,
1253 Owi4o = mkldnn_Owi4o,
1254 Owi8o = mkldnn_Owi8o,
1255 IOhw16o16i = mkldnn_IOhw16o16i,
1256 Ohwi16o = mkldnn_Ohwi16o,
1257 Ohwi4o = mkldnn_Ohwi4o,
1258 Ohwi8o = mkldnn_Ohwi8o,
1259 OIhw16i16o = mkldnn_OIhw16i16o,
1260 OIhw16o16i = mkldnn_OIhw16o16i,
1261 Oihw16o = mkldnn_Oihw16o,
1262 OIhw4i16o4i = mkldnn_OIhw4i16o4i,
1263 OIhw4i4o = mkldnn_OIhw4i4o,
1264 Oihw4o = mkldnn_Oihw4o,
1265 OIhw8i16o2i = mkldnn_OIhw8i16o2i,
1266 OIhw8i8o = mkldnn_OIhw8i8o,
1267 OIhw8o16i2o = mkldnn_OIhw8o16i2o,
1268 OIhw8o8i = mkldnn_OIhw8o8i,
1269 Odhwi16o = mkldnn_Odhwi16o,
1270 Odhwi4o = mkldnn_Odhwi4o,
1271 Odhwi8o = mkldnn_Odhwi8o,
1272 OIdhw16i16o = mkldnn_OIdhw16i16o,
1273 OIdhw16o16i = mkldnn_OIdhw16o16i,
1274 Oidhw16o = mkldnn_Oidhw16o,
1275 OIdhw4i4o = mkldnn_OIdhw4i4o,
1276 Oidhw4o = mkldnn_Oidhw4o,
1277 OIdhw8i16o2i = mkldnn_OIdhw8i16o2i,
1278 OIdhw8i8o = mkldnn_OIdhw8i8o,
1279 OIdhw8o8i = mkldnn_OIdhw8o8i,
1280 gIOw16o16i = mkldnn_gIOw16o16i,
1281 gOIw16i16o = mkldnn_gOIw16i16o,
1282 gOIw16o16i = mkldnn_gOIw16o16i,
1283 gOiw16o = mkldnn_gOiw16o,
1284 gOIw4i16o4i = mkldnn_gOIw4i16o4i,
1285 gOIw4i4o = mkldnn_gOIw4i4o,
1286 gOiw4o = mkldnn_gOiw4o,
1287 gOIw8i16o2i = mkldnn_gOIw8i16o2i,
1288 gOIw8i8o = mkldnn_gOIw8i8o,
1289 gOIw8o16i2o = mkldnn_gOIw8o16i2o,
1290 gOIw8o8i = mkldnn_gOIw8o8i,
1291 gOwi16o = mkldnn_gOwi16o,
1292 gOwi4o = mkldnn_gOwi4o,
1293 gOwi8o = mkldnn_gOwi8o,
1294 gIOhw16o16i = mkldnn_gIOhw16o16i,
1295 gOhwi16o = mkldnn_gOhwi16o,
1296 gOhwi4o = mkldnn_gOhwi4o,
1297 gOhwi8o = mkldnn_gOhwi8o,
1298 Goihw16g = mkldnn_Goihw16g,
1299 gOIhw16i16o = mkldnn_gOIhw16i16o,
1300 gOIhw16o16i = mkldnn_gOIhw16o16i,
1301 gOihw16o = mkldnn_gOihw16o,
1302 gOIhw2i8o4i = mkldnn_gOIhw2i8o4i,
1303 gOIhw4i16o4i = mkldnn_gOIhw4i16o4i,
1304 gOIhw4i4o = mkldnn_gOIhw4i4o,
1305 gOIhw4o4i = mkldnn_gOIhw4o4i,
1306 gOihw4o = mkldnn_gOihw4o,
1307 Goihw8g = mkldnn_Goihw8g,
1308 gOIhw8i16o2i = mkldnn_gOIhw8i16o2i,
1309 gOIhw8i8o = mkldnn_gOIhw8i8o,
1310 gOIhw8o16i2o = mkldnn_gOIhw8o16i2o,
1311 OIhw4o8i8o4i = mkldnn_OIhw4o8i8o4i,
1312 OIhw2o8i8o2i = mkldnn_OIhw2o8i8o2i,
1313 gOIhw4o8i8o4i = mkldnn_gOIhw4o8i8o4i,
1314 gOIhw2o8i8o2i = mkldnn_gOIhw2o8i8o2i,
1315 gOIhw8o8i = mkldnn_gOIhw8o8i,
1316 gIOdhw16i16o = mkldnn_gIOdhw16i16o,
1317 gOdhwi16o = mkldnn_gOdhwi16o,
1318 gOdhwi4o = mkldnn_gOdhwi4o,
1319 gOdhwi8o = mkldnn_gOdhwi8o,
1320 gOIdhw16i16o = mkldnn_gOIdhw16i16o,
1321 gOIdhw16o16i = mkldnn_gOIdhw16o16i,
1322 gOidhw16o = mkldnn_gOidhw16o,
1323 gOIdhw4i4o = mkldnn_gOIdhw4i4o,
1324 gOidhw4o = mkldnn_gOidhw4o,
1325 gOIdhw8i16o2i = mkldnn_gOIdhw8i16o2i,
1326 gOIdhw8i8o = mkldnn_gOIdhw8i8o,
1327 gOIdhw8o8i = mkldnn_gOIdhw8o8i,
1345 validate_dims(adims);
1348 adims.size() == 0 ? nullptr : &adims[0],
1349 convert_to_c(adata_type), convert_to_c(aformat_tag)),
1350 "could not initialize a memory descriptor by tag");
1359 validate_dims(adims);
1362 adims.size() == 0 ? nullptr : &adims[0],
1363 convert_to_c(adata_type),
1364 astrides.size() == 0 ? nullptr : &astrides[0]),
1365 "could not initialize a memory descriptor by strides");
1380 &
data, &adims[0], &offsets[0]),
1381 "could not initialize a sub-memory");
1382 return desc(sub_md);
1392 bool operator==(
const desc &other)
const {
1396 bool operator!=(
const desc &other)
const {
return !operator==(other); }
1409 aengine.
get(), ahandle),
"could not create a memory");
1418 :
memory(md, aengine, MKLDNN_MEMORY_ALLOCATE) {}
1424 "could not get memory descriptor from a memory");
1425 return desc(*cdesc);
1432 "could not get engine from a memory");
1442 "could not get native handle");
1446 void set_data_handle(
void *
handle)
const {
1448 "could not set native handle");
1466 template <
typename T =
void>
1470 "could not map the data");
1471 return static_cast<T *
>(mapped_ptr);
1484 "could not unmap the data");
1487 #if MKLDNN_GPU_RUNTIME == MKLDNN_RUNTIME_OCL 1488 cl_mem get_ocl_mem_object()
const {
1492 "could not get OpenCL memory object");
1497 void set_ocl_mem_object(cl_mem mem_object) {
1499 "could not set OpenCL memory object");
1513 return a == memory::convert_to_c(b);
1526 return a == memory::convert_to_c(b);
1551 struct primitive_desc :
public handle<mkldnn_primitive_desc_t> {
1552 primitive_desc() =
default;
1560 &
dst_md.data, dst_engine.
get(), aattr.get()),
1561 "could not create a reorder primitive descriptor");
1573 "could not create a reorder primitive descriptor");
1592 "could not get scratchpad engine from reorder primitive_desc");
1597 engine get_engine() {
return engine::query(*
this); }
1605 primitive(primitive_desc(src, dst).
get()) {}
1607 using primitive::execute;
1610 primitive::execute(astream,
1611 {{MKLDNN_ARG_FROM, src}, {MKLDNN_ARG_TO, dst}});
1632 struct primitive_desc :
public handle<mkldnn_primitive_desc_t> {
1633 std::vector<mkldnn_memory_desc_t> cpp_to_c(
1634 const std::vector<memory::desc> &srcs) {
1635 std::vector<mkldnn_memory_desc_t> c_api_srcs;
1636 c_api_srcs.reserve(srcs.size());
1637 for (
const auto &s : srcs) c_api_srcs.push_back(s.data);
1641 primitive_desc() =
default;
1643 primitive_desc(
const memory::desc &dst,
int concat_dimension,
1644 const std::vector<memory::desc> &srcs,
const engine &aengine,
1646 auto c_api_srcs = cpp_to_c(srcs);
1651 (
int)c_api_srcs.size(), concat_dimension,
1652 &c_api_srcs[0], aattr.get(), aengine.
get()),
1653 "could not create a concat primitive descriptor");
1657 primitive_desc(
int concat_dimension,
1658 const std::vector<memory::desc> &srcs,
const engine &aengine,
1660 auto c_api_srcs = cpp_to_c(srcs);
1665 (
int)c_api_srcs.size(), concat_dimension,
1666 &c_api_srcs[0], aattr.get(), aengine.
get()),
1667 "could not create a concat primitive descriptor");
1688 engine get_engine() {
return engine::query(*
this); }
1711 struct primitive_desc :
public handle<mkldnn_primitive_desc_t> {
1712 std::vector<mkldnn_memory_desc_t> cpp_to_c(
1713 const std::vector<memory::desc> &srcs) {
1714 std::vector<mkldnn_memory_desc_t> c_api_srcs;
1715 c_api_srcs.reserve(srcs.size());
1716 for (
const auto &s : srcs) c_api_srcs.push_back(s.data);
1720 primitive_desc() =
default;
1723 const std::vector<float> &scales,
1724 const std::vector<memory::desc> &srcs,
const engine &aengine,
1728 "number of scales not equal to number of srcs");
1730 auto c_api_srcs = cpp_to_c(srcs);
1734 &result, &dst.
data, (
int)c_api_srcs.size(),
1735 &scales[0], &c_api_srcs[0], aattr.get(), aengine.
get()),
1736 "could not create a sum primitive descriptor");
1740 primitive_desc(
const std::vector<float> &scales,
1741 const std::vector<memory::desc> &srcs,
const engine &aengine,
1745 "number of scales not equal to number of srcs");
1747 auto c_api_srcs = cpp_to_c(srcs);
1750 nullptr, (
int)c_api_srcs.size(), &scales[0],
1751 &c_api_srcs[0], aattr.get(), aengine.
get()),
1752 "could not create a sum primitive descriptor");
1773 engine get_engine() {
return engine::query(*
this); }
1802 &iterator, desc, attr ? attr->
get() :
nullptr, e.
get(),
1805 "could not create a primitive descriptor iterator");
1806 pd_iterator.reset(iterator);
1810 engine get_engine() {
return engine::query(*
this); }
1812 primitive_attr get_primitive_attr()
const {
1815 "could not get attributes");
1818 "could not clone attributes");
1820 primitive_attr attr;
1830 "could not query implementation info string");
1838 mkldnn::convert_to_c(q), 0, &res);
1863 if (!std::any_of(valid_q.cbegin(), valid_q.cend(),
1864 [=](
query q) {
return what == q; }))
1868 get(), mkldnn::convert_to_c(what), idx);
1886 "could not fetch a primitive descriptor from the iterator");
1924 const memory::dims &strides,
1925 const memory::dims &padding_l,
1926 const memory::dims &padding_r) {
1927 memory::validate_dims(strides);
1928 memory::validate_dims(padding_l);
1929 memory::validate_dims(padding_r);
1931 mkldnn::convert_to_c(aprop_kind), convert_to_c(aalgorithm),
1933 &dst_desc.
data, &strides[0], &padding_l[0],
1935 "could not create a convolution forward descriptor");
1950 const memory::dims &strides,
1951 const memory::dims &padding_l,
1952 const memory::dims &padding_r) {
1953 memory::validate_dims(strides);
1954 memory::validate_dims(padding_l);
1955 memory::validate_dims(padding_r);
1957 mkldnn::convert_to_c(aprop_kind), convert_to_c(aalgorithm),
1958 &src_desc.
data, &weights_desc.
data,
nullptr,
1959 &dst_desc.
data, &strides[0], &padding_l[0],
1961 "could not create a convolution forward descriptor");
1977 const memory::dims &strides,
1978 const memory::dims &dilates,
1979 const memory::dims &padding_l,
1980 const memory::dims &padding_r) {
1981 memory::validate_dims(strides);
1982 memory::validate_dims(dilates);
1983 memory::validate_dims(padding_l);
1984 memory::validate_dims(padding_r);
1987 mkldnn::convert_to_c(aprop_kind), convert_to_c(aalgorithm),
1989 &dst_desc.
data, &strides[0], &dilates[0],
1990 &padding_l[0], &padding_r[0]),
1991 "could not create a dilated convolution forward descriptor");
2006 const memory::dims &strides,
2007 const memory::dims &dilates,
2008 const memory::dims &padding_l,
2009 const memory::dims &padding_r) {
2010 memory::validate_dims(strides);
2011 memory::validate_dims(dilates);
2012 memory::validate_dims(padding_l);
2013 memory::validate_dims(padding_r);
2016 mkldnn::convert_to_c(aprop_kind), convert_to_c(aalgorithm),
2017 &src_desc.
data, &weights_desc.
data,
nullptr,
2018 &dst_desc.
data, &strides[0], &dilates[0],
2019 &padding_l[0], &padding_r[0]),
2020 "could not create a dilated convolution forward descriptor");
2089 const memory::dims &strides,
2090 const memory::dims &padding_l,
2091 const memory::dims &padding_r) {
2092 memory::validate_dims(strides);
2093 memory::validate_dims(padding_l);
2094 memory::validate_dims(padding_r);
2096 &data, convert_to_c(aalgorithm), &diff_src_desc.
data,
2097 &weights_desc.
data, &diff_dst_desc.
data,
2098 &strides[0], &padding_l[0], &padding_r[0]),
2099 "could not create a convolution backward data descriptor");
2112 const memory::dims &strides,
2113 const memory::dims &dilates,
2114 const memory::dims &padding_l,
2115 const memory::dims &padding_r) {
2116 memory::validate_dims(strides);
2117 memory::validate_dims(dilates);
2118 memory::validate_dims(padding_l);
2119 memory::validate_dims(padding_r);
2122 &data, convert_to_c(aalgorithm), &diff_src_desc.
data,
2123 &weights_desc.
data, &diff_dst_desc.
data,
2124 &strides[0], &dilates[0], &padding_l[0], &padding_r[0]),
2125 "could not create a convolution backward data descriptor");
2189 const memory::dims &strides,
2190 const memory::dims &padding_l,
2191 const memory::dims &padding_r) {
2192 memory::validate_dims(strides);
2193 memory::validate_dims(padding_l);
2194 memory::validate_dims(padding_r);
2196 &data, convert_to_c(aalgorithm), &src_desc.
data,
2197 &diff_weights_desc.
data, &diff_bias_desc.
data,
2198 &diff_dst_desc.
data,
2199 &strides[0], &padding_l[0], &padding_r[0]),
2200 "could not create a convolution backward weights descriptor");
2213 const memory::dims &strides,
2214 const memory::dims &padding_l,
2215 const memory::dims &padding_r) {
2216 memory::validate_dims(strides);
2217 memory::validate_dims(padding_l);
2218 memory::validate_dims(padding_r);
2220 &data, convert_to_c(aalgorithm), &src_desc.
data,
2221 &diff_weights_desc.
data,
nullptr, &diff_dst_desc.
data,
2222 &strides[0], &padding_l[0], &padding_r[0]),
2223 "could not create a convolution backward weights descriptor");
2237 const memory::dims &strides,
2238 const memory::dims &dilates,
2239 const memory::dims &padding_l,
2240 const memory::dims &padding_r) {
2241 memory::validate_dims(strides);
2242 memory::validate_dims(dilates);
2243 memory::validate_dims(padding_l);
2244 memory::validate_dims(padding_r);
2246 &data, convert_to_c(aalgorithm), &src_desc.
data,
2247 &diff_weights_desc.
data, &diff_bias_desc.
data,
2248 &diff_dst_desc.
data,
2249 &strides[0], &dilates[0], &padding_l[0], &padding_r[0]),
2250 "could not create a convolution backward weights descriptor");
2263 const memory::dims &strides,
2264 const memory::dims &dilates,
2265 const memory::dims &padding_l,
2266 const memory::dims &padding_r) {
2267 memory::validate_dims(strides);
2268 memory::validate_dims(dilates);
2269 memory::validate_dims(padding_l);
2270 memory::validate_dims(padding_r);
2272 &data, convert_to_c(aalgorithm), &src_desc.
data,
2273 &diff_weights_desc.
data,
nullptr, &diff_dst_desc.
data,
2274 &strides[0], &dilates[0], &padding_l[0],
2276 "could not create a convolution backward weights descriptor");
2355 const memory::dims &strides,
2356 const memory::dims &padding_l,
2357 const memory::dims &padding_r) {
2358 memory::validate_dims(strides);
2359 memory::validate_dims(padding_l);
2360 memory::validate_dims(padding_r);
2362 mkldnn::convert_to_c(aprop_kind), convert_to_c(aalgorithm),
2364 &dst_desc.
data, &strides[0], &padding_l[0],
2366 "could not create a deconvolution forward descriptor");
2381 const memory::dims &strides,
2382 const memory::dims &padding_l,
2383 const memory::dims &padding_r) {
2384 memory::validate_dims(strides);
2385 memory::validate_dims(padding_l);
2386 memory::validate_dims(padding_r);
2388 mkldnn::convert_to_c(aprop_kind), convert_to_c(aalgorithm),
2389 &src_desc.
data, &weights_desc.
data,
nullptr,
2390 &dst_desc.
data, &strides[0], &padding_l[0],
2392 "could not create a deconvolution forward descriptor");
2408 const memory::dims &strides,
2409 const memory::dims &dilates,
2410 const memory::dims &padding_l,
2411 const memory::dims &padding_r) {
2412 memory::validate_dims(strides);
2413 memory::validate_dims(dilates);
2414 memory::validate_dims(padding_l);
2415 memory::validate_dims(padding_r);
2417 mkldnn::convert_to_c(aprop_kind), convert_to_c(aalgorithm),
2419 &dst_desc.
data, &strides[0], &dilates[0], &padding_l[0],
2421 "could not create a dilated deconvolution forward descriptor");
2436 const memory::dims &strides,
2437 const memory::dims &dilates,
2438 const memory::dims &padding_l,
2439 const memory::dims &padding_r) {
2440 memory::validate_dims(strides);
2441 memory::validate_dims(dilates);
2442 memory::validate_dims(padding_l);
2443 memory::validate_dims(padding_r);
2445 mkldnn::convert_to_c(aprop_kind), convert_to_c(aalgorithm),
2446 &src_desc.
data, &weights_desc.
data,
nullptr,
2447 &dst_desc.
data, &strides[0], &dilates[0], &padding_l[0],
2449 "could not create a dilated deconvolution forward descriptor");
2518 const memory::dims &strides,
2519 const memory::dims &padding_l,
2520 const memory::dims &padding_r) {
2521 memory::validate_dims(strides);
2522 memory::validate_dims(padding_l);
2523 memory::validate_dims(padding_r);
2525 &data, convert_to_c(aalgorithm), &diff_src_desc.
data,
2526 &weights_desc.
data, &diff_dst_desc.
data,
2527 &strides[0], &padding_l[0], &padding_r[0]),
2528 "could not create a deconvolution backward data descriptor");
2541 const memory::dims &strides,
2542 const memory::dims &dilates,
2543 const memory::dims &padding_l,
2544 const memory::dims &padding_r) {
2545 memory::validate_dims(strides);
2546 memory::validate_dims(dilates);
2547 memory::validate_dims(padding_l);
2548 memory::validate_dims(padding_r);
2550 &data, convert_to_c(aalgorithm), &diff_src_desc.
data,
2551 &weights_desc.
data, &diff_dst_desc.
data,
2552 &strides[0], &dilates[0], &padding_l[0], &padding_r[0]),
2553 "could not create a dilated deconvolution backward data descriptor");
2617 const memory::dims &strides,
2618 const memory::dims &padding_l,
2619 const memory::dims &padding_r) {
2620 memory::validate_dims(strides);
2621 memory::validate_dims(padding_l);
2622 memory::validate_dims(padding_r);
2624 &data, convert_to_c(aalgorithm), &src_desc.
data,
2625 &diff_weights_desc.
data, &diff_bias_desc.
data,
2626 &diff_dst_desc.
data,
2627 &strides[0], &padding_l[0], &padding_r[0]),
2628 "could not create a deconvolution backward weights descriptor");
2641 const memory::dims &strides,
2642 const memory::dims &padding_l,
2643 const memory::dims &padding_r) {
2644 memory::validate_dims(strides);
2645 memory::validate_dims(padding_l);
2646 memory::validate_dims(padding_r);
2648 &data, convert_to_c(aalgorithm), &src_desc.
data,
2649 &diff_weights_desc.
data,
nullptr, &diff_dst_desc.
data,
2650 &strides[0], &padding_l[0], &padding_r[0]),
2651 "could not create a deconvolution backward weights descriptor");
2665 const memory::dims &strides,
2666 const memory::dims &dilates,
2667 const memory::dims &padding_l,
2668 const memory::dims &padding_r) {
2669 memory::validate_dims(strides);
2670 memory::validate_dims(dilates);
2671 memory::validate_dims(padding_l);
2672 memory::validate_dims(padding_r);
2674 &data, convert_to_c(aalgorithm), &src_desc.
data,
2675 &diff_weights_desc.
data, &diff_bias_desc.
data,
2676 &diff_dst_desc.
data,
2677 &strides[0], &dilates[0], &padding_l[0], &padding_r[0]),
2678 "could not create a dilated deconvolution backward weights descriptor");
2691 const memory::dims &strides,
2692 const memory::dims &dilates,
2693 const memory::dims &padding_l,
2694 const memory::dims &padding_r) {
2695 memory::validate_dims(strides);
2696 memory::validate_dims(dilates);
2697 memory::validate_dims(padding_l);
2698 memory::validate_dims(padding_r);
2700 &data, convert_to_c(aalgorithm), &src_desc.
data,
2701 &diff_weights_desc.
data,
nullptr, &diff_dst_desc.
data,
2702 &strides[0], &dilates[0], &padding_l[0], &padding_r[0]),
2703 "could not create a dilated deconvolution backward weights descriptor");
2775 float alpha,
float beta,
float k = 1.f) {
2777 mkldnn::convert_to_c(aprop_kind), convert_to_c(aalgorithm),
2778 &src_desc.
data, local_size, alpha, beta, k),
2779 "could not create a lrn forward descriptor");
2830 const memory::desc &diff_data_desc, memory::dim local_size,
2831 float alpha,
float beta,
float k = 1.f) {
2833 convert_to_c(aalgorithm), &diff_data_desc.
data,
2834 &data_desc.
data, local_size, alpha, beta, k),
2835 "could not create a lrn backward descriptor");
2900 const memory::dims &strides,
2901 const memory::dims &kernel,
2902 const memory::dims &padding_l,
2903 const memory::dims &padding_r) {
2904 memory::validate_dims(strides);
2905 memory::validate_dims(kernel);
2906 memory::validate_dims(padding_l);
2907 memory::validate_dims(padding_r);
2909 mkldnn::convert_to_c(aprop_kind),
2910 convert_to_c(aalgorithm),
2912 &strides[0], &kernel[0],
2913 &padding_l[0], &padding_r[0]),
2914 "could not init a forward pooling descriptor");
2951 struct pooling_backward :
public primitive {
2963 const memory::dims &strides,
2964 const memory::dims &kernel,
2965 const memory::dims &padding_l,
2966 const memory::dims &padding_r) {
2967 memory::validate_dims(strides);
2968 memory::validate_dims(kernel);
2969 memory::validate_dims(padding_l);
2970 memory::validate_dims(padding_r);
2972 convert_to_c(aalgorithm),
2973 &diff_src_desc.
data, &diff_dst_desc.
data,
2974 &strides[0], &kernel[0],
2975 &padding_l[0], &padding_r[0]),
2976 "could not init a backward pooling descriptor");
3010 pooling_backward() =
default;
3046 const memory::desc &src_desc,
float alpha = 0,
float beta = 0) {
3048 mkldnn::convert_to_c(aprop_kind),
3049 mkldnn::convert_to_c(aalgorithm), &src_desc.
data,
3051 "could not create a eltwise forward descriptor");
3093 const memory::desc &data_desc,
float alpha = 0,
float beta = 0)
3096 mkldnn::convert_to_c(aalgorithm), &diff_data_desc.
data,
3097 &data_desc.
data, alpha, beta),
3098 "could not create a eltwise backward descriptor");
3158 mkldnn::convert_to_c(aprop_kind), &data_desc.
data,
3160 "could not create a softmax forward descriptor");
3203 &diff_desc.
data, &data_desc.
data, softmax_axis),
3204 "could not init a backward softmax descriptor");
3281 mkldnn::convert_to_c(aprop_kind), &src_desc.
data,
3282 epsilon, convert_to_c(flags)),
3283 "could not create a batch normalization forward " 3326 return stat_desc(mean);
3331 return stat_desc(var);
3335 enum { mean = 1, var = 2, };
3340 "could not get a batch-normalization descriptor");
3347 batch_normalization_forward() =
default;
3349 batch_normalization_forward(
const primitive_desc &pd): primitive(pd) {}
3373 mkldnn::convert_to_c(aprop_kind),
3374 &diff_data_desc.
data, &data_desc.
data,
3375 epsilon, convert_to_c(flags)),
3376 "could not create a batch normalization backward " 3480 mkldnn::convert_to_c(aprop_kind), &src_desc.
data,
3482 "could not create a inner product forward descriptor");
3490 mkldnn::convert_to_c(aprop_kind), &src_desc.
data,
3491 &weights_desc.
data,
nullptr, &dst_desc.
data),
3492 "could not create a inner product forward descriptor");
3551 &diff_src_desc.
data, &weights_desc.
data,
3552 &diff_dst_desc.
data),
3553 "could not create a inner product backward data descriptor");
3608 &data, &src_desc.
data, &diff_weights_desc.
data,
3609 &diff_bias_desc.
data, &diff_dst_desc.
data),
3610 "could not create a inner product backward weights descriptor");
3617 &data, &src_desc.
data, &diff_weights_desc.
data,
3618 nullptr, &diff_dst_desc.
data),
3619 "could not create a inner product backward weights descriptor");
3699 rnn_direction direction,
3707 rnn_flags flags = rnn_flags::undef,
3708 float alpha = 0.0f,
float beta = 0.0f) {
3710 mkldnn::convert_to_c(aprop_kind),
3711 mkldnn::convert_to_c(activation),
3712 mkldnn::convert_to_c(direction),
3713 &src_layer_desc.
data, &src_iter_desc.
data,
3714 &weights_layer_desc.
data, &weights_iter_desc.
data,
3716 &dst_layer_desc.
data, &dst_iter_desc.
data,
3717 mkldnn::convert_to_c(flags), alpha, beta),
3718 "could not create an RNN forward descriptor");
3817 rnn_direction direction,
3832 rnn_flags flags = rnn_flags::undef,
3833 float alpha = 0.0f,
float beta = 0.0f) {
3835 mkldnn::convert_to_c(aprop_kind), mkldnn::convert_to_c(activation),
3836 mkldnn::convert_to_c(direction),
3837 &src_layer_desc.
data, &src_iter_desc.
data,
3838 &weights_layer_desc.
data, &weights_iter_desc.
data,
3840 &dst_layer_desc.
data, &dst_iter_desc.
data,
3841 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
3842 &diff_weights_layer_desc.
data,
3843 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
3844 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
3845 mkldnn::convert_to_c(flags), alpha, beta),
3846 "could not create an RNN backward descriptor");
3988 rnn_direction direction,
3998 rnn_flags flags = rnn_flags::undef) {
4000 mkldnn::convert_to_c(aprop_kind),
4001 mkldnn::convert_to_c(direction),
4002 &src_layer_desc.
data, &src_iter_desc.
data,
4003 &src_iter_c_desc.
data,
4004 &weights_layer_desc.
data, &weights_iter_desc.
data,
4006 &dst_layer_desc.
data, &dst_iter_desc.
data,
4007 &dst_iter_c_desc.
data,
4008 mkldnn::convert_to_c(flags)),
4009 "could not create an LSTM forward descriptor");
4138 rnn_flags flags = rnn_flags::undef) {
4140 mkldnn::convert_to_c(aprop_kind),
4141 mkldnn::convert_to_c(direction),
4142 &src_layer_desc.
data, &src_iter_desc.
data, &src_iter_c_desc.
data,
4143 &weights_layer_desc.
data, &weights_iter_desc.
data,
4145 &dst_layer_desc.
data, &dst_iter_desc.
data, &dst_iter_c_desc.
data,
4146 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data, &diff_src_iter_c_desc.
data,
4147 &diff_weights_layer_desc.
data,
4148 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
4149 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data, &diff_dst_iter_c_desc.
data,
4150 mkldnn::convert_to_c(flags)),
4151 "could not create an LSTM backward descriptor");
4316 rnn_direction direction,
4324 rnn_flags flags = rnn_flags::undef) {
4326 mkldnn::convert_to_c(aprop_kind),
4327 mkldnn::convert_to_c(direction),
4328 &src_layer_desc.
data, &src_iter_desc.
data,
4329 &weights_layer_desc.
data, &weights_iter_desc.
data,
4331 &dst_layer_desc.
data, &dst_iter_desc.
data,
4332 mkldnn::convert_to_c(flags)),
4333 "could not create a GRU forward descriptor");
4445 rnn_flags flags = rnn_flags::undef) {
4447 mkldnn::convert_to_c(aprop_kind),
4448 mkldnn::convert_to_c(direction),
4449 &src_layer_desc.
data, &src_iter_desc.
data,
4450 &weights_layer_desc.
data, &weights_iter_desc.
data,
4452 &dst_layer_desc.
data, &dst_iter_desc.
data,
4453 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
4454 &diff_weights_layer_desc.
data,
4455 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
4456 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
4457 mkldnn::convert_to_c(flags)),
4458 "could not create an GRU backward descriptor");
4603 rnn_direction direction,
4611 rnn_flags flags = rnn_flags::undef) {
4613 mkldnn::convert_to_c(aprop_kind),
4614 mkldnn::convert_to_c(direction),
4615 &src_layer_desc.
data, &src_iter_desc.
data,
4616 &weights_layer_desc.
data, &weights_iter_desc.
data,
4618 &dst_layer_desc.
data, &dst_iter_desc.
data,
4619 mkldnn::convert_to_c(flags)),
4620 "could not create a Linear-before-reset GRU forward descriptor");
4732 rnn_flags flags = rnn_flags::undef) {
4734 mkldnn::convert_to_c(aprop_kind),
4735 mkldnn::convert_to_c(direction),
4736 &src_layer_desc.
data, &src_iter_desc.
data,
4737 &weights_layer_desc.
data, &weights_iter_desc.
data,
4739 &dst_layer_desc.
data, &dst_iter_desc.
data,
4740 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
4741 &diff_weights_layer_desc.
data,
4742 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
4743 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
4744 mkldnn::convert_to_c(flags)),
4745 "could not create an LBR_GRU backward descriptor");
4883 int axis,
int group_size) {
4885 mkldnn::convert_to_c(aprop_kind), &data_desc.
data,
4887 "could not create a shuffle forward descriptor");
4925 desc(
const memory::desc &diff_data_desc,
int axis,
int group_size) {
4927 &diff_data_desc.
data, axis, group_size),
4928 "could not create a shuffle backward descriptor");
4934 primitive_desc() =
default;
4936 primitive_desc(
const desc &desc,
const engine &e,
4940 &desc.data, &aattr, e, hint_fwd_pd.
get()) {}
4965 #ifndef DOXYGEN_SHOULD_SKIP_THIS 4970 "could not create a primitive");
4974 inline primitive::primitive(
const primitive_desc &pd): primitive(pd.get()) {}
4976 inline void primitive::execute(stream &astream,
4977 const std::unordered_map<int, memory> &args)
const {
4978 std::vector<mkldnn_exec_arg_t> c_args;
4979 c_args.reserve(args.size());
4980 for (
const auto &a: args)
4981 c_args.push_back({a.first, a.second.get()});
4984 (int)c_args.size(), c_args.data()),
4985 "could not execute a primitive");
4987 #endif // DOXYGEN_SHOULD_SKIP_THIS void append_sum(float scale=1.)
Appends accumulation (sum) post operation.
Definition: mkldnn.hpp:601
Primitive descriptor for eltwise backward propagation.
Definition: mkldnn.hpp:3103
LRN within a single channel.
Definition: mkldnn_types.h:694
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: mkldnn.hpp:4516
GRU cell with linear before reset.
A descriptor of a Local Response Normalization (LRN) operation.
Definition: mkldnn_types.h:1081
Average pooling include padding.
batch normalization descriptor
op descriptor
Definition: mkldnn_types.h:1516
mkldnn_status_t MKLDNN_API mkldnn_lbr_gru_backward_desc_init(mkldnn_rnn_desc_t *rnn_desc, mkldnn_prop_kind_t prop_kind, mkldnn_rnn_direction_t direction, const mkldnn_memory_desc_t *src_layer_desc, const mkldnn_memory_desc_t *src_iter_desc, const mkldnn_memory_desc_t *weights_layer_desc, const mkldnn_memory_desc_t *weights_iter_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_layer_desc, const mkldnn_memory_desc_t *dst_iter_desc, const mkldnn_memory_desc_t *diff_src_layer_desc, const mkldnn_memory_desc_t *diff_src_iter_desc, const mkldnn_memory_desc_t *diff_weights_layer_desc, const mkldnn_memory_desc_t *diff_weights_iter_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_layer_desc, const mkldnn_memory_desc_t *diff_dst_iter_desc, unsigned flags)
Initializes an LBR GRU descriptor rnn_desc for backward propagation using prop_kind, direction, and memory descriptors.
memory::desc src_iter_desc() const
Queries source recurrent hidden state memory descriptor.
Definition: mkldnn.hpp:4177
Packed weights format used in RNN.
Definition: mkldnn_types.h:99
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e, const convolution_forward::primitive_desc &hint_fwd_pd)
Initializes a primitive descriptor for convolution weight update with attributes defined by attr...
Definition: mkldnn.hpp:2292
2D CNN activations tensor, an alias to mkldnn_ab
Definition: mkldnn_types.h:340
T * map_data() const
Maps the data of the memory.
Definition: mkldnn.hpp:1467
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for deconvolution forward propagation without bias using prop_kind (possible...
Definition: mkldnn.hpp:2377
mkldnn_status_t MKLDNN_API mkldnn_primitive_attr_destroy(mkldnn_primitive_attr_t attr)
Deletes an attr.
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: mkldnn.hpp:3581
A tensor in a generic format described by the stride and blocking values in each dimension.
A softmax primitive.
Definition: mkldnn_types.h:629
4D tensor blocked by 2nd dimension with block size 16
Definition: mkldnn_types.h:231
Primitive descriptor for GRU backward propagation.
Definition: mkldnn.hpp:4464
number of outputs expected
Definition: mkldnn_types.h:1501
mkldnn_status_t MKLDNN_API mkldnn_stream_destroy(mkldnn_stream_t stream)
Destroys an execution stream.
Average pooling exclude padding, alias for mkldnn::algorithm::pooling_avg_include_padding.
A base class for all primitive descriptors.
Definition: mkldnn.hpp:1792
GPU engine.
Definition: mkldnn_types.h:1262
Unspecified format kind.
Definition: mkldnn_types.h:91
mkldnn_status_t
Status values returned by the library functions.
Definition: mkldnn_types.h:50
mkldnn_status_t MKLDNN_API mkldnn_lstm_forward_desc_init(mkldnn_rnn_desc_t *rnn_desc, mkldnn_prop_kind_t prop_kind, mkldnn_rnn_direction_t direction, const mkldnn_memory_desc_t *src_layer_desc, const mkldnn_memory_desc_t *src_iter_desc, const mkldnn_memory_desc_t *src_iter_c_desc, const mkldnn_memory_desc_t *weights_layer_desc, const mkldnn_memory_desc_t *weights_iter_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_layer_desc, const mkldnn_memory_desc_t *dst_iter_desc, const mkldnn_memory_desc_t *dst_iter_c_desc, unsigned flags)
Initializes an LSTM descriptor rnn_desc for forward propagation using prop_kind, direction, and memory descriptors.
memory::desc variance_desc() const
Queries variance memory descriptor.
Definition: mkldnn.hpp:3408
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for dilated deconvolution forward propagation without bias using aprop_kind ...
Definition: mkldnn.hpp:2432
4D tensor blocked by 1st and 2nd dimension with block size 8
Definition: mkldnn_types.h:250
Primitive descriptor for pooling forward propagation.
Definition: mkldnn.hpp:2919
A descriptor of a convolution operation.
Definition: mkldnn_types.h:938
16-bit/half-precision floating point.
desc(prop_kind aprop_kind, const memory::desc &data_desc, int axis, int group_size)
Initializes a shuffle descriptor for forward propagation using prop_kind, memory descriptor data_desc...
Definition: mkldnn.hpp:4882
Descriptor for pooling forward propagation.
Definition: mkldnn.hpp:2889
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &bias_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for dilated deconvolution forward propagation with bias using aprop_kind (po...
Definition: mkldnn.hpp:2403
permuted 3D tensor
Definition: mkldnn_types.h:193
mkldnn_status_t MKLDNN_API mkldnn_dilated_convolution_backward_weights_desc_init(mkldnn_convolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *diff_weights_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t dilates, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a convolution descriptor conv_desc for backward propagation with respect to weights using...
Primitive descriptor for deconvolution weight update.
Definition: mkldnn.hpp:2708
mkldnn_status_t MKLDNN_API mkldnn_post_ops_create(mkldnn_post_ops_t *post_ops)
Creates an empty sequence of post operations post_ops.
mkldnn_status_t MKLDNN_API mkldnn_primitive_desc_destroy(mkldnn_primitive_desc_t primitive_desc)
Deletes a primitive_desc.
memory consumption (bytes)
int MKLDNN_API mkldnn_memory_desc_equal(const mkldnn_memory_desc_t *lhs, const mkldnn_memory_desc_t *rhs)
Compares two memory descriptors.
desc(algorithm aalgorithm, const memory::desc &diff_src_desc, const memory::desc &weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for convolution backward propagation using aalgorithm, memory descriptors...
Definition: mkldnn.hpp:2085
The operation failed because of incorrect function arguments.
Definition: mkldnn_types.h:56
Primitive descriptor for LSTM backward propagation.
Definition: mkldnn.hpp:4157
Eltwise: exponent.
Definition: mkldnn_types.h:678
desc()
Constructs a zero memory descriptor.
Definition: mkldnn.hpp:1337
Forward data propagation (alias for mkldnn_forward_inference).
Definition: mkldnn_types.h:596
Descriptor for local response normalization forward propagation.
Definition: mkldnn.hpp:2765
Descriptor for deconvolution weight update.
Definition: mkldnn.hpp:2603
An opaque structure to describe an engine.
Primitive descriptor for inner product forward propagation.
Definition: mkldnn.hpp:3497
Backward data propagation.
Definition: mkldnn_types.h:602
Descriptor for softmax backward propagation.
Definition: mkldnn.hpp:3195
4D RNN bias tensor in the format (num_layers, num_directions, num_gates, output_channels).
Definition: mkldnn_types.h:427
mkldnn_status_t MKLDNN_API mkldnn_primitive_desc_get_attr(const_mkldnn_primitive_desc_t primitive_desc, const_mkldnn_primitive_attr_t *attr)
Returns a constant reference to the attribute of a primitive_desc.
Use global statistics.
Definition: mkldnn_types.h:724
Shuffle for backward propagation.
Definition: mkldnn.hpp:4917
memory::desc src_iter_desc() const
Queries source iteration memory descriptor.
Definition: mkldnn.hpp:4771
mkldnn_status_t MKLDNN_API mkldnn_memory_get_memory_desc(const_mkldnn_memory_t memory, const mkldnn_memory_desc_t **memory_desc)
Returns a memory_desc associated with memory.
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for deconvolution weight update with bias using aalgorithm, memory descriptors, strides, padding_l, and padding_r.
Definition: mkldnn.hpp:2612
desc(prop_kind aprop_kind, const memory::desc &data_desc, int softmax_axis)
Initializes a softmax descriptor for forward propagation using prop_kind (possible values are mkldnn:...
Definition: mkldnn.hpp:3155
mkldnn_status_t MKLDNN_API mkldnn_stream_create(mkldnn_stream_t *stream, mkldnn_engine_t engine, unsigned flags)
Creates an execution stream for engine and with flags.
const_mkldnn_primitive_desc_t get_primitive_desc() const
Returns the descriptor of the underlying C API primitive.
Definition: mkldnn.hpp:227
memory::desc diff_src_desc() const
Queries diff source gradient memory descriptor.
Definition: mkldnn.hpp:2574
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: mkldnn.hpp:4201
Default order execution.
Definition: mkldnn_types.h:1550
mkldnn_status_t MKLDNN_API mkldnn_primitive_attr_clone(mkldnn_primitive_attr_t *attr, const_mkldnn_primitive_attr_t existing_attr)
Makes a copy of an existing_attr.
mkldnn_status_t MKLDNN_API mkldnn_lrn_forward_desc_init(mkldnn_lrn_desc_t *lrn_desc, mkldnn_prop_kind_t prop_kind, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *data_desc, mkldnn_dim_t local_size, float alpha, float beta, float k)
Initializes an lrn_desc for forward propagation using prop_kind (possible values are mkldnn_forward_t...
kind get_kind() const
Returns the kind of the engine.
Definition: mkldnn.hpp:848
desc submemory_desc(const dims &adims, const dims &offsets)
Constructs a sub-memory descriptor.
Definition: mkldnn.hpp:1377
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:2807
A descriptor of a Softmax operation.
Definition: mkldnn_types.h:1032
memory::desc diff_src_desc() const
Queries diff source memory descriptor.
Definition: mkldnn.hpp:3226
mkldnn_status_t MKLDNN_API mkldnn_deconvolution_backward_data_desc_init(mkldnn_deconvolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *diff_src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a deconvolution descriptor conv_desc for backward propagation with respect to data using ...
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &bias_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for convolution forward propagation without bias using aprop_kind (possible ...
Definition: mkldnn.hpp:1919
mkldnn_status_t MKLDNN_API mkldnn_memory_unmap_data(const_mkldnn_memory_t memory, void *mapped_ptr)
For a memory, unmaps a mapped pointer to the data of the memory.
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: mkldnn.hpp:4389
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: mkldnn.hpp:2486
void set_rnn_data_qparams(float scale, float shift)
Sets quantization scale and shift for RNN data tensors.
Definition: mkldnn.hpp:733
5D tensor blocked by 2nd dimension with block size 16
Definition: mkldnn_types.h:260
permuted 4D tensor
Definition: mkldnn_types.h:204
A descriptor of an inner product operation.
Definition: mkldnn_types.h:1135
mkldnn_status_t MKLDNN_API mkldnn_post_ops_destroy(mkldnn_post_ops_t post_ops)
Deletes a post_ops sequence.
memory::desc diff_weights_layer_desc() const
Queries diff weights layer memory descriptor.
Definition: mkldnn.hpp:4250
An opaque structure for a chain of post operations.
4D CNN activations tensor, an alias to mkldnn::memory::format_tag::bcda
An opaque structure to describe a primitive descriptor.
batch normalization descriptor
Definition: mkldnn_types.h:1524
void reset(T t, bool weak=false)
Resets the value of a C handle.
Definition: mkldnn.hpp:131
A convolution primitive.
Definition: mkldnn_types.h:623
LSTM descriptor for backward propagation.
Definition: mkldnn.hpp:4098
mkldnn_rnn_direction_t
A direction of RNN primitive execution.
Definition: mkldnn_types.h:1169
Backward weights propagation.
primitive_desc(const desc &desc, const engine &e, const deconvolution_forward::primitive_desc &hint_fwd_pd)
Initializes a primitive descriptor for deconvolution backward propagation.
Definition: mkldnn.hpp:2563
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: mkldnn.hpp:3890
source memory desc
Definition: mkldnn_types.h:1531
engine(const mkldnn_engine_t &aengine)
Constructs an engine from other engine aengine.
Definition: mkldnn.hpp:833
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: mkldnn.hpp:3652
engine(const handle< mkldnn_primitive_desc_t > &pd)
Constructs an engine from the primitive descriptor pd by querying its engine.
Definition: mkldnn.hpp:838
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: mkldnn.hpp:3221
mkldnn_status_t MKLDNN_API mkldnn_batch_normalization_forward_desc_init(mkldnn_batch_normalization_desc_t *bnrm_desc, mkldnn_prop_kind_t prop_kind, const mkldnn_memory_desc_t *data_desc, float epsilon, unsigned flags)
Initializes a batch normalization descriptor bnrm_desc for forward propagation using prop_kind (possi...
mkldnn_status_t MKLDNN_API mkldnn_vanilla_rnn_backward_desc_init(mkldnn_rnn_desc_t *rnn_desc, mkldnn_prop_kind_t prop_kind, const mkldnn_alg_kind_t activation, const mkldnn_rnn_direction_t direction, const mkldnn_memory_desc_t *src_layer_desc, const mkldnn_memory_desc_t *src_iter_desc, const mkldnn_memory_desc_t *weights_layer_desc, const mkldnn_memory_desc_t *weights_iter_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_layer_desc, const mkldnn_memory_desc_t *dst_iter_desc, const mkldnn_memory_desc_t *diff_src_layer_desc, const mkldnn_memory_desc_t *diff_src_iter_desc, const mkldnn_memory_desc_t *diff_weights_layer_desc, const mkldnn_memory_desc_t *diff_weights_iter_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_layer_desc, const mkldnn_memory_desc_t *diff_dst_iter_desc, unsigned flags, float alpha, float beta)
Initializes an RNN descriptor rnn_desc for backward propagation using prop_kind, activation, direction, and memory descriptors.
weights memory descriptor desc
An execution engine.
Definition: mkldnn.hpp:783
Forward data propagation, alias for mkldnn::prop_kind::forward_inference.
deconvolution_backward_weights(const primitive_desc &pd)
Creates a deconvolution weight update primitive from the corresponding primitive descriptor.
Definition: mkldnn.hpp:2747
4D tensor blocked by 1st and 2nd dimension with block size 8
mkldnn_status_t MKLDNN_API mkldnn_post_ops_append_eltwise(mkldnn_post_ops_t post_ops, float scale, mkldnn_alg_kind_t alg, float alpha, float beta)
Appends eltwise post operation to the post_ops with given parameters kind, alpha, and beta (...
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: mkldnn.hpp:3938
mkldnn_status_t MKLDNN_API mkldnn_pooling_forward_desc_init(mkldnn_pooling_desc_t *pool_desc, mkldnn_prop_kind_t prop_kind, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t kernel, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a pooling descriptor pool_desc for forward propagation using prop_kind (possible values a...
Backward data propagation.
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: mkldnn.hpp:4508
memory(const desc &md, const engine &aengine, void *ahandle)
Constructs a memory.
Definition: mkldnn.hpp:1406
5D CNN weights tensor (incl. groups), an alias to mkldnn_abcde
Definition: mkldnn_types.h:392
Undefined primitive.
Definition: mkldnn_types.h:613
An inner product primitive.
Definition: mkldnn_types.h:637
3D CNN weights tensor, an alias to mkldnn_cba
Definition: mkldnn_types.h:367
memory::desc diff_dst_iter_c_desc() const
Queries diff destination recurrent cell state memory descriptor.
Definition: mkldnn.hpp:4278
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:2039
LSTM for backward propagation.
Definition: mkldnn.hpp:4095
primitive_attr()
Creates a default primitive attribute.
Definition: mkldnn.hpp:650
Element-wise operations for backward propagation.
Definition: mkldnn.hpp:3084
error(mkldnn_status_t astatus, const char *amessage)
Constructs an error instance.
Definition: mkldnn.hpp:61
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:2929
Primitive descriptor for softmax forward propagation.
Definition: mkldnn.hpp:3165
void get_params_sum(int index, float &scale) const
Gets the parameters of the accumulation (sum) post operation with index index.
Definition: mkldnn.hpp:608
desc(prop_kind aprop_kind, algorithm activation, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &diff_src_layer_desc, const memory::desc &diff_src_iter_desc, const memory::desc &diff_weights_layer_desc, const memory::desc &diff_weights_iter_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_layer_desc, const memory::desc &diff_dst_iter_desc, rnn_flags flags=rnn_flags::undef, float alpha=0.0f, float beta=0.0f)
Initializes an RNN descriptor for backward propagation using prop_kind, activation, direction, and memory descriptors.
Definition: mkldnn.hpp:3816
32-bit signed integer.
Definition: mkldnn_types.h:78
bool is_zero() const
Returns true if the memory descriptor describes an empty memory.
Definition: mkldnn.hpp:1390
Use scale and shift parameters.
Definition: mkldnn_types.h:737
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:4900
Max pooling.
Definition: mkldnn_types.h:685
Use scale and shift parameters.
5D CNN activations tensor, an alias to mkldnn_acdeb
Definition: mkldnn_types.h:356
mkldnn_status_t MKLDNN_API mkldnn_softmax_forward_desc_init(mkldnn_softmax_desc_t *softmax_desc, mkldnn_prop_kind_t prop_kind, const mkldnn_memory_desc_t *data_desc, int softmax_axis)
Initializes a softmax_desc for forward propagation using prop_kind (possible values are mkldnn_forwar...
permuted 5D tensor
Definition: mkldnn_types.h:194
mkldnn_status_t MKLDNN_API mkldnn_memory_desc_init_by_strides(mkldnn_memory_desc_t *memory_desc, int ndims, const mkldnn_dims_t dims, mkldnn_data_type_t data_type, const mkldnn_dims_t strides)
Initializes a memory_desc memory descriptor using ndims, dims, data_type, and strides.
memory::desc scratchpad_desc() const
Queries scratchpad memory descriptor.
Definition: mkldnn.hpp:1876
const post_ops get_post_ops() const
Returns post_ops previously set by set_post_ops.
Definition: mkldnn.hpp:710
5D CNN activations tensor blocked by channels with block size 8, an alias to mkldnn_aBcde8b ...
Definition: mkldnn_types.h:441
execution engine
Definition: mkldnn_types.h:1497
mkldnn_status_t MKLDNN_API mkldnn_primitive_desc_iterator_next(mkldnn_primitive_desc_iterator_t iterator)
Iterates over primitive descriptors.
convolution_backward_weights(const primitive_desc &pd)
Creates convolution weight update primitive from corresponding primitive descriptor.
Definition: mkldnn.hpp:2321
Pooling for forward propagation.
Definition: mkldnn.hpp:2886
mkldnn_status_t MKLDNN_API mkldnn_lrn_backward_desc_init(mkldnn_lrn_desc_t *lrn_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *diff_data_desc, const mkldnn_memory_desc_t *data_desc, mkldnn_dim_t local_size, float alpha, float beta, float k)
Initializes an lrn_desc for backward propagation using alg_kind, memory descriptors data_desc and dif...
5D CNN weights tensor, an alias to mkldnn_abcde
Definition: mkldnn_types.h:381
mkldnn_status_t MKLDNN_API mkldnn_convolution_backward_weights_desc_init(mkldnn_convolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *diff_weights_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a convolution descriptor conv_desc for backward propagation with respect to weights using...
Primitive descriptor for batch normalization backward propagation.
Definition: mkldnn.hpp:3382
memory::desc mean_desc() const
Queries mean memory descriptor.
Definition: mkldnn.hpp:3403
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: mkldnn.hpp:2481
mkldnn_status_t MKLDNN_API mkldnn_primitive_attr_create(mkldnn_primitive_attr_t *attr)
Creates an empty (default) attr attribute.
size_t MKLDNN_API mkldnn_memory_desc_get_size(const mkldnn_memory_desc_t *memory_desc)
Returns the size (in bytes) that is required for given memory_desc.
deconvolution_backward_data(const primitive_desc &pd)
Creates a deconvolution backward propagation primitive from the corresponding primitive descriptor...
Definition: mkldnn.hpp:2593
mkldnn_status_t MKLDNN_API mkldnn_pooling_backward_desc_init(mkldnn_pooling_desc_t *pool_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *diff_src_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t kernel, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a pooling descriptor pool_desc for backward propagation using alg_kind, memory descriptors, and pooling parameters in the spatial domain: strides, kernel sizes, padding_l, and padding_r.
algorithm
Kinds of algorithms.
Definition: mkldnn.hpp:282
mkldnn_status_t MKLDNN_API mkldnn_dilated_convolution_backward_data_desc_init(mkldnn_convolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *diff_src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t dilates, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a dilated convolution descriptor conv_desc for backward propagation with respect to data ...
5D CNN activations tensor blocked by channels with block size 4, an alias to mkldnn_aBcde4b ...
Definition: mkldnn_types.h:438
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: mkldnn.hpp:3760
A descriptor of a element-wise operation.
Definition: mkldnn_types.h:998
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: mkldnn.hpp:2733
rnn descriptor
Definition: mkldnn_types.h:1526
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for convolution weight update with bias using aalgorithm, memory descriptors, strides, padding_l, and padding_r.
Definition: mkldnn.hpp:2184
An element-wise primitive.
Definition: mkldnn_types.h:627
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for deconvolution weight update without bias using aalgorithm, memory descriptors, strides, padding_l, and padding_r.
Definition: mkldnn.hpp:2637
Primitive descriptor for inner product backward propagation with respect to data. ...
Definition: mkldnn.hpp:3559
mkldnn_status_t MKLDNN_API mkldnn_primitive_execute(const_mkldnn_primitive_t primitive, mkldnn_stream_t stream, int nargs, const mkldnn_exec_arg_t *args)
Executes a primitive using a stream, and nargs arguments args.
Softmax for backward propagation.
Definition: mkldnn.hpp:3192
memory::desc src_iter_desc() const
Queries source iteration memory descriptor.
Definition: mkldnn.hpp:3742
mkldnn_status_t MKLDNN_API mkldnn_vanilla_rnn_forward_desc_init(mkldnn_rnn_desc_t *rnn_desc, mkldnn_prop_kind_t prop_kind, const mkldnn_alg_kind_t activation, const mkldnn_rnn_direction_t direction, const mkldnn_memory_desc_t *src_layer_desc, const mkldnn_memory_desc_t *src_iter_desc, const mkldnn_memory_desc_t *weights_layer_desc, const mkldnn_memory_desc_t *weights_iter_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_layer_desc, const mkldnn_memory_desc_t *dst_iter_desc, unsigned flags, float alpha, float beta)
Initializes an RNN descriptor rnn_desc for forward propagation using prop_kind, activation, direction, and memory descriptors.
Unidirectional execution of RNN primitive from left to right.
Definition: mkldnn_types.h:1171
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, rnn_flags flags=rnn_flags::undef)
Initializes an LBR GRU descriptor for forward propagation using prop_kind, direction, and memory descriptors.
Definition: mkldnn.hpp:4602
Initializes an eltwise descriptor for backward propagation using aalgorithm algorithm memory descript...
Definition: mkldnn.hpp:3089
A descriptor for an RNN operation.
Definition: mkldnn_types.h:1184
memory::desc diff_dst_layer_desc() const
Queries diff destination layer memory descriptor.
Definition: mkldnn.hpp:4557
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: mkldnn.hpp:3313
Implements primitive descriptor and primitive for concat.
Definition: mkldnn.hpp:1631
eltwise descriptor
Definition: mkldnn_types.h:1520
memory::desc src_iter_desc() const
Queries source recurrent hidden state memory descriptor.
Definition: mkldnn.hpp:4033
memory::desc diff_weights_layer_desc() const
Queries diff weights layer memory descriptor.
Definition: mkldnn.hpp:4829
3D CNN activations tensor, an alias to mkldnn_acb
Definition: mkldnn_types.h:346
mkldnn_status_t MKLDNN_API mkldnn_convolution_backward_data_desc_init(mkldnn_convolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *diff_src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a convolution descriptor conv_desc for backward propagation with respect to data using al...
scratchpad_mode get_scratchpad_mode() const
Returns the scratchpad mode.
Definition: mkldnn.hpp:658
deconvolution_forward(const primitive_desc &pd)
Creates a deconvolution forward propagation primitive from the corresponding primitive descriptor...
Definition: mkldnn.hpp:2495
primitive_desc(const desc &desc, const engine &e)
Initializes a primitive descriptor for convolution forward propagation.
Definition: mkldnn.hpp:2030
mkldnn_status_t MKLDNN_API mkldnn_primitive_attr_set_rnn_data_qparams(mkldnn_primitive_attr_t attr, const float scale, const float shift)
Sets quantization scale and shift for RNN data tensors.
size_t MKLDNN_API mkldnn_engine_get_count(mkldnn_engine_kind_t kind)
Returns the number of engines of a particular kind.
An opaque structure to describe a memory.
LSTM for forward propagation.
Definition: mkldnn.hpp:3964
3D CNN activations tensor, an alias to mkldnn_abc
Definition: mkldnn_types.h:344
format_kind
Memory format kind.
Definition: mkldnn.hpp:1021
Eltwise: soft_relu.
Definition: mkldnn_types.h:674
Primitive descriptor for convolution backward propagation.
Definition: mkldnn.hpp:2130
void set_post_ops(post_ops ops)
Sets post_ops for future use.
Definition: mkldnn.hpp:720
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &diff_src_layer_desc, const memory::desc &diff_src_iter_desc, const memory::desc &diff_weights_layer_desc, const memory::desc &diff_weights_iter_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_layer_desc, const memory::desc &diff_dst_iter_desc, rnn_flags flags=rnn_flags::undef)
Initializes an LBR_GRU descriptor for backward propagation using prop_kind, direction, and memory descriptors.
Definition: mkldnn.hpp:4717
memory::desc diff_weights_iter_desc() const
Queries diff weights iteration memory descriptor.
Definition: mkldnn.hpp:4547
mkldnn_primitive_kind_t MKLDNN_API mkldnn_post_ops_get_kind(const_mkldnn_post_ops_t post_ops, int index)
Returns the kind of post operation with index index in given post_ops.
T get(bool allow_emtpy=false) const
Returns the value of the underlying C handle.
Definition: mkldnn.hpp:136
32-bit/single-precision floating point.
Forward data propagation, alias for mkldnn::prop_kind::forward_training.
RNN cell.
Definition: mkldnn_types.h:696
desc(prop_kind aprop_kind, const memory::desc &diff_data_desc, const memory::desc &data_desc, float epsilon, normalization_flags flags)
Initializes a batch normalization descriptor for backward propagation with respect to data and scale-...
Definition: mkldnn.hpp:3368
Post operations.
Definition: mkldnn.hpp:560
A user shall query and provide the scratchpad memory to primitives.
Definition: mkldnn_types.h:1318
Eltwise: gelu.
Definition: mkldnn_types.h:683
convolution_forward(const primitive_desc &pd)
Creates a convolution forward propagation primitive from the corresponding primitive descriptor...
Definition: mkldnn.hpp:2066
Initializes an inner product descriptor for backward propagation with respect to data using memory de...
Definition: mkldnn.hpp:3544
Convolution forward propagation.
Definition: mkldnn.hpp:1905
Backward weights propagation.
Definition: mkldnn_types.h:604
memory::desc diff_weights_desc() const
Queries diff weights memory descriptor.
Definition: mkldnn.hpp:3642
mkldnn_status_t MKLDNN_API mkldnn_primitive_attr_set_output_scales(mkldnn_primitive_attr_t attr, mkldnn_dim_t count, int mask, const float *scales)
Sets output scales for primitive operations.
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:4226
format_tag
Memory format tag specification.
Definition: mkldnn.hpp:1039
32-bit/single-precision floating point.
Definition: mkldnn_types.h:76
6D CNN weights tensor (incl. groups), an alias to mkldnn_abcdef
Definition: mkldnn_types.h:398
desc(algorithm aalgorithm, const memory::desc &diff_src_desc, const memory::desc &weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes descriptor for dilated deconvolution backward propagation using aalgorithm, memory descriptors, strides, padding_l, and padding_r.
Definition: mkldnn.hpp:2537
Memory descriptor.
Definition: mkldnn_types.h:865
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: mkldnn.hpp:3512
Initializes an inner product descriptor for forward propagation using prop_kind (possible values are ...
Definition: mkldnn.hpp:3472
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: mkldnn.hpp:4495
memory::desc diff_dst_layer_desc() const
Queries diff destination layer memory descriptor.
Definition: mkldnn.hpp:4265
mkldnn_status_t MKLDNN_API mkldnn_inner_product_backward_data_desc_init(mkldnn_inner_product_desc_t *ip_desc, const mkldnn_memory_desc_t *diff_src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *diff_dst_desc)
Initializes an inner product descriptor ip_desc for backward propagation with respect to data using m...
Packed weights format used in RNN.
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: mkldnn.hpp:4193
Base class for all computational primitives.
Definition: mkldnn.hpp:174
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: mkldnn.hpp:3576
memory::desc weights_desc() const
Queries weights (scale and shift) memory descriptor.
Definition: mkldnn.hpp:3308
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: mkldnn.hpp:4476
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: mkldnn.hpp:2738
Inner product for forward propagation.
Definition: mkldnn.hpp:3461
3D CNN activations tensor blocked by channels with block size 8, an alias to mkldnn_aBc8b ...
Definition: mkldnn_types.h:459
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: mkldnn.hpp:4763
pooling descriptor
Definition: mkldnn_types.h:1522
Descriptor for pooling backward propagation.
Definition: mkldnn.hpp:2954
prop_kind
Propagation kind.
Definition: mkldnn.hpp:253
Default stream configuration.
mkldnn_format_tag_t
Memory format tag specification.
Definition: mkldnn_types.h:170
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: mkldnn.hpp:3525
5D RNN weights tensor in the format (num_layers, num_directions, num_gates, output_channels, input_channels).
Definition: mkldnn_types.h:420
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: mkldnn.hpp:4490
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: mkldnn.hpp:4376
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: mkldnn.hpp:4668
mkldnn_status_t MKLDNN_API mkldnn_dilated_deconvolution_backward_weights_desc_init(mkldnn_deconvolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *diff_weights_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t dilates, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a dilated deconvolution descriptor conv_desc for backward propagation with respect to wei...
mkldnn_status_t MKLDNN_API mkldnn_primitive_desc_iterator_create(mkldnn_primitive_desc_iterator_t *iterator, const_mkldnn_op_desc_t op_desc, const_mkldnn_primitive_attr_t attr, mkldnn_engine_t engine, const_mkldnn_primitive_desc_t hint_forward_primitive_desc)
Creates a primitive descriptor iterator for given op_desc, attr, engine, and optionally a hint primit...
memory::desc diff_dst_iter_desc() const
Queries diff destination iteration memory descriptor.
Definition: mkldnn.hpp:4565
The operation was successful.
Definition: mkldnn_types.h:52
Primitive descriptor for LSTM forward propagation.
Definition: mkldnn.hpp:4015
mkldnn_status_t MKLDNN_API mkldnn_engine_create(mkldnn_engine_t *engine, mkldnn_engine_kind_t kind, size_t index)
Creates an engine of particular kind and index.
primitive_desc(const desc &desc, const engine &e, const convolution_forward::primitive_desc &hint_fwd_pd)
Initializes a primitive descriptor for convolution weight update.
Definition: mkldnn.hpp:2286
LBR_GRU for forward propagation.
Definition: mkldnn.hpp:4579
primitive_desc(const_mkldnn_op_desc_t desc, const primitive_attr *attr, const engine &e, const_mkldnn_primitive_desc_t hint_fwd_pd)
Creates a primitive descriptor from given op_desc, attr, engine, and optionally a hint primitive desc...
Definition: mkldnn.hpp:1798
desc(algorithm aalgorithm, const memory::desc &diff_src_desc, const memory::desc &weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for dilated convolution backward propagation using aalgorithm, memory descriptors, strides, padding_l, and padding_r.
Definition: mkldnn.hpp:2108
4D CNN weights tensor, an alias to mkldnn_abcd
Definition: mkldnn_types.h:371
Backward propagation (with respect to all parameters).
Definition: mkldnn_types.h:600
desc(algorithm aalgorithm, const memory::desc &diff_src_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &kernel, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a pooling descriptor for backward propagation using aalgorithm, memory descriptors...
Definition: mkldnn.hpp:2960
permuted 3D tensor
Definition: mkldnn_types.h:203
memory::desc src_iter_desc() const
Queries source iteration memory descriptor.
Definition: mkldnn.hpp:4357
softmax descriptor
Definition: mkldnn_types.h:1521
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &diff_src_layer_desc, const memory::desc &diff_src_iter_desc, const memory::desc &diff_weights_layer_desc, const memory::desc &diff_weights_iter_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_layer_desc, const memory::desc &diff_dst_iter_desc, rnn_flags flags=rnn_flags::undef)
Initializes an GRU descriptor for backward propagation using prop_kind, direction, and memory descriptors.
Definition: mkldnn.hpp:4430
A deconvolution primitive.
Definition: mkldnn_types.h:625
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &kernel, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a pooling descriptor for forward propagation using aprop_kind (possible values are mkldnn...
Definition: mkldnn.hpp:2897
3D RNN data tensor in the format (batch, seq_length, input channels).
Definition: mkldnn_types.h:403
Definition: mkldnn.hpp:41
3D tensor blocked by 2nd dimension with block size 16
Definition: mkldnn_types.h:213
no query
Definition: mkldnn_types.h:1495
Initializes an inner product descriptor for backward propagation with respect to weights using memory...
Definition: mkldnn.hpp:3600
Descriptor for convolution forward propagation.
Definition: mkldnn.hpp:2339
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: mkldnn.hpp:3180
RNN descriptor for backward propagation.
Definition: mkldnn.hpp:3796
Default stream configuration.
Definition: mkldnn_types.h:1556
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &src_iter_c_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &dst_iter_c_desc, rnn_flags flags=rnn_flags::undef)
Initializes an LSTM descriptor for forward propagation using prop_kind, direction, and memory descriptors.
Definition: mkldnn.hpp:3987
8-bit unsigned integer.
Definition: mkldnn_types.h:82
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: mkldnn.hpp:4206
Average pooling include padding.
Definition: mkldnn_types.h:687
A tensor in a generic format described by the stride and blocking values in each dimension.
Definition: mkldnn_types.h:95
Primitive descriptor for local response normalization forward propagation.
Definition: mkldnn.hpp:2785
permuted 4D tensor
Definition: mkldnn_types.h:195
mkldnn_status_t MKLDNN_API mkldnn_lbr_gru_forward_desc_init(mkldnn_rnn_desc_t *rnn_desc, mkldnn_prop_kind_t prop_kind, mkldnn_rnn_direction_t direction, const mkldnn_memory_desc_t *src_layer_desc, const mkldnn_memory_desc_t *src_iter_desc, const mkldnn_memory_desc_t *weights_layer_desc, const mkldnn_memory_desc_t *weights_iter_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_layer_desc, const mkldnn_memory_desc_t *dst_iter_desc, unsigned flags)
Initializes an LBR GRU descriptor rnn_desc for forward propagation using prop_kind, direction, and memory descriptors.
permuted 4D tensor
Definition: mkldnn_types.h:201
memory::desc src_iter_desc() const
Queries source iteration memory descriptor.
Definition: mkldnn.hpp:4644
Eltwise: hyperbolic tangent non-linearity (tanh)
Local response normalization (LRN) across multiple channels.
Definition: mkldnn_types.h:692
Fuse with ReLU.
Definition: mkldnn_types.h:746
GRU cell.
Definition: mkldnn_types.h:700
void set_output_scales(int mask, const std::vector< float > &scales)
Sets output scales for primitive operations.
Definition: mkldnn.hpp:703
implementation name
Definition: mkldnn_types.h:1512
4D CNN activations tensor, an alias to mkldnn_abcd
Definition: mkldnn_types.h:348
desc(prop_kind aprop_kind, algorithm activation, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, rnn_flags flags=rnn_flags::undef, float alpha=0.0f, float beta=0.0f)
Initializes an RNN descriptor for forward propagation using prop_kind, activation, direction, and memory descriptors.
Definition: mkldnn.hpp:3698
3D RNN data tensor in the format (seq_length, batch, input channels).
Definition: mkldnn_types.h:401
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: mkldnn.hpp:4044
Descriptor for convolution forward propagation.
Definition: mkldnn.hpp:1908
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: mkldnn.hpp:3418
memory::desc src_iter_desc() const
Queries source iteration memory descriptor.
Definition: mkldnn.hpp:3872
6D tensor blocked by 2nd dimension with block size 4
Definition: mkldnn_types.h:293
Eltwise: parametric exponential linear unit (elu)
Definition: mkldnn_types.h:662
Just a sentinel, not real memory format tag.
Definition: mkldnn_types.h:333
kind
Kinds of engines.
Definition: mkldnn.hpp:787
Descriptor for local response normalization backward propagation.
Definition: mkldnn.hpp:2822
Inner product for backward propagation with respect to data.
Definition: mkldnn.hpp:3537
Intel(R) MKL-DNN exception class.
Definition: mkldnn.hpp:53
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, rnn_flags flags=rnn_flags::undef)
Initializes a GRU descriptor for forward propagation using prop_kind, direction, and memory descripto...
Definition: mkldnn.hpp:4315
memory::desc diff_src_desc() const
Queries diff source memory descriptor.
Definition: mkldnn.hpp:3120
Eltwise: ReLU.
Definition: mkldnn_types.h:658
mkldnn_status_t MKLDNN_API mkldnn_memory_create(mkldnn_memory_t *memory, const mkldnn_memory_desc_t *memory_desc, mkldnn_engine_t engine, void *handle)
Creates a memory for given memory_desc and engine.
Softmax for forward propagation.
Definition: mkldnn.hpp:3146
Out-of-order execution.
Definition: mkldnn_types.h:1554
number of outputs expected
memory::desc src_iter_desc() const
Queries source iter memory descriptor.
Definition: mkldnn.hpp:4484
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: mkldnn.hpp:3520
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: mkldnn.hpp:4790
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: mkldnn.hpp:4655
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e, const batch_normalization_forward::primitive_desc &hint_fwd_pd)
Initializes a primitive descriptor for batch normalization backward propagation with attributes defin...
Definition: mkldnn.hpp:3393
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: mkldnn.hpp:2044
mkldnn_status_t MKLDNN_API mkldnn_primitive_attr_set_post_ops(mkldnn_primitive_attr_t attr, const_mkldnn_post_ops_t post_ops)
Sets configured post_ops to an attribute attr for future use (when primitive descriptor is being crea...
Descriptor for RNN forward propagation.
Definition: mkldnn.hpp:3677
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: mkldnn.hpp:4839
scratchpad_mode
Scratchpad mode.
Definition: mkldnn.hpp:241
scratchpad memory desc
Definition: mkldnn_types.h:1538
Eltwise: square.
Definition: mkldnn_types.h:664
Creates an out-of-place sum primitive descriptor for sum of n inputs multiplied by the scale with res...
Definition: mkldnn.hpp:1710
flags
Stream flags.
Definition: mkldnn.hpp:910
mkldnn_status_t MKLDNN_API mkldnn_eltwise_forward_desc_init(mkldnn_eltwise_desc_t *eltwise_desc, mkldnn_prop_kind_t prop_kind, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *data_desc, float alpha, float beta)
Initializes an eltwise_desc for forward propagation using prop_kind (possible values are mkldnn_forwa...
5D tensor blocked by 2nd dimension with block size 8
Definition: mkldnn_types.h:276
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for dilated deconvolution weight update with bias using aalgorithm, memory descriptors, strides, dilates padding_l, and padding_r.
Definition: mkldnn.hpp:2660
Eltwise: parametric exponential linear unit (elu)
memory::desc diff_src_layer_desc() const
Queries diff source layer memory descriptor.
Definition: mkldnn.hpp:4816
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:3175
Backward bias propagation.
Definition: mkldnn_types.h:606
memory::desc src_iter_c_desc() const
Queries source recurrent cell state memory descriptor.
Definition: mkldnn.hpp:4039
Initializes a reorder primitive using the description of the source (src_engine and src_md) and desti...
Definition: mkldnn.hpp:1550
query
Primitive descriptor query specification.
Definition: mkldnn.hpp:467
memory::desc dst_iter_c_desc() const
Queries destination recurrent cell state memory descriptor.
Definition: mkldnn.hpp:4075
mkldnn_status_t MKLDNN_API mkldnn_primitive_desc_query(const_mkldnn_primitive_desc_t primitive_desc, mkldnn_query_t what, int index, void *result)
Queries primitive descriptor.
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: mkldnn.hpp:3864
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: mkldnn.hpp:2151
A descriptor of a shuffle operation.
Definition: mkldnn_types.h:981
void get_params_eltwise(int index, float &scale, algorithm &alg, float &alpha, float &beta) const
Gets the eltwise parameters of the post operation with index index.
Definition: mkldnn.hpp:629
scratchpad engine – engine to be used for creating scratchpad memory
Definition: mkldnn_types.h:1509
permuted 5D tensor
Definition: mkldnn_types.h:196
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: mkldnn.hpp:2800
primitive_desc(const desc &desc, const engine &e, const deconvolution_forward::primitive_desc &hint_fwd_pd)
Initializes a primitive descriptor for deconvolution weight update.
Definition: mkldnn.hpp:2712
convolution_backward_data(const primitive_desc &pd)
Creates a convolution backward propagation primitive from the corresponding primitive descriptor...
Definition: mkldnn.hpp:2165
Primitive attributes.
Definition: mkldnn.hpp:648
5D CNN activations tensor, an alias to mkldnn_abcde
Definition: mkldnn_types.h:354
Primitive descriptor for deconvolution backward propagation.
Definition: mkldnn.hpp:2558
Average pooling exclude padding.
weights grad. memory desc
int ndims
Number of dimensions.
Definition: mkldnn_types.h:867
Local response normalization for forward propagation.
Definition: mkldnn.hpp:2762
kind
Kinds of primitives.
Definition: mkldnn.hpp:181
memory::desc mean_desc() const
Queries mean memory descriptor.
Definition: mkldnn.hpp:3325
An opaque structure to describe an execution stream.
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:3507
Primitive descriptor for LBR_GRU backward propagation.
Definition: mkldnn.hpp:4751
memory::desc diff_dst_iter_desc() const
Queries diff destination recurrent hidden state memory descriptor.
Definition: mkldnn.hpp:4273
6D tensor blocked by 2nd dimension with block size 16
Definition: mkldnn_types.h:289
mkldnn_status_t MKLDNN_API mkldnn_eltwise_backward_desc_init(mkldnn_eltwise_desc_t *eltwise_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *diff_data_desc, const mkldnn_memory_desc_t *data_desc, float alpha, float beta)
Initializes an eltwise_desc for backward propagation using alg_kind algorithm memory descriptors diff...
mkldnn_stream_flags_t
Stream flags.
Definition: mkldnn_types.h:1547
Descriptor for shuffle forward propagation.
Definition: mkldnn.hpp:4876
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: mkldnn.hpp:3125
mkldnn_status_t MKLDNN_API mkldnn_primitive_desc_iterator_destroy(mkldnn_primitive_desc_iterator_t iterator)
Deletes a primitive descriptor iterator.
Primitive descriptor for local response normalization backward propagation.
Definition: mkldnn.hpp:2841
mkldnn_scratchpad_mode_t
Scratchpad mode.
Definition: mkldnn_types.h:1314
memory::desc query_md(query what, int idx=0) const
Queries and returns requested memory descriptor.
Definition: mkldnn.hpp:1859
mkldnn_status_t MKLDNN_API mkldnn_post_ops_append_sum(mkldnn_post_ops_t post_ops, float scale)
Appends accumulation (sum) post operation to the post_ops.
Convolution weight update.
Definition: mkldnn.hpp:2172
3D CNN activations tensor blocked by channels with block size 16, an alias to mkldnn_aBc16b ...
Definition: mkldnn_types.h:453
A rnn primitive.
Definition: mkldnn_types.h:639
mkldnn_status_t MKLDNN_API mkldnn_dilated_convolution_forward_desc_init(mkldnn_convolution_desc_t *conv_desc, mkldnn_prop_kind_t prop_kind, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t dilates, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a dilated convolution descriptor conv_desc for forward propagation using prop_kind (possi...
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for convolution weight update without bias using aalgorithm, memory descriptors, strides, padding_l, and padding_r.
Definition: mkldnn.hpp:2209
A deconvolution primitive.
Descriptor for LSTM forward propagation.
Definition: mkldnn.hpp:3967
mkldnn_prop_kind_t
Kinds of propagation.
Definition: mkldnn_types.h:584
CPU engine.
Definition: mkldnn_types.h:1260
Eltwise: square root.
Definition: mkldnn_types.h:668
permuted 3D tensor
Definition: mkldnn_types.h:198
Undefined data type, used for empty memory descriptors.
mkldnn_status_t MKLDNN_API mkldnn_memory_destroy(mkldnn_memory_t memory)
Deletes a memory.
Winograd convolution.
Definition: mkldnn_types.h:650
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:4810
Eltwise: linear.
Definition: mkldnn_types.h:670
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: mkldnn.hpp:3647
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for dilated convolution weight update without bias using aalgorithm...
Definition: mkldnn.hpp:2259
non-standard 16-bit (bfloat16 w/ 7 bit mantissa) floating point.
Definition: mkldnn_types.h:74
memory::desc diff_weights_layer_desc() const
Queries diff weights layer memory descriptor.
Definition: mkldnn.hpp:4542
mkldnn_status_t MKLDNN_API mkldnn_softmax_backward_desc_init(mkldnn_softmax_desc_t *softmax_desc, const mkldnn_memory_desc_t *diff_desc, const mkldnn_memory_desc_t *data_desc, int softmax_axis)
Initializes a softmax_desc for backward propagation using memory descriptors diff_desc and data_desc...
mkldnn_status_t MKLDNN_API mkldnn_memory_set_data_handle(mkldnn_memory_t memory, void *handle)
For a memory, sets the data handle.
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: mkldnn.hpp:4049
Eltwise: logistic.
Definition: mkldnn_types.h:676
Batch normalization backward propagation.
Definition: mkldnn.hpp:3354
Direct convolution.
Definition: mkldnn_types.h:648
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:3115
Primitive iterator passed over last primitive descriptor.
Definition: mkldnn_types.h:60
mkldnn_status_t MKLDNN_API mkldnn_memory_map_data(const_mkldnn_memory_t memory, void **mapped_ptr)
For a memory, maps the data of the memory to mapped_ptr.
memory::desc weights_desc() const
Queries weights (scale and shift) memory descriptor.
Definition: mkldnn.hpp:3413
Descriptor for convolution backward propagation.
Definition: mkldnn.hpp:2076
2D CNN activations tensor, an alias to mkldnn::memory::format_tag::ab
An opaque structure for primitive descriptor attributes.
memory::desc diff_weights_iter_desc() const
Queries diff weights iteration memory descriptor.
Definition: mkldnn.hpp:3933
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: mkldnn.hpp:3734
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:3910
mkldnn_status_t MKLDNN_API mkldnn_shuffle_forward_desc_init(mkldnn_shuffle_desc_t *shuffle_desc, mkldnn_prop_kind_t prop_kind, const mkldnn_memory_desc_t *data_desc, int axis, mkldnn_dim_t group_size)
Initializes a shuffle_desc for forward propagation using prop_kind, memory descriptor data_desc...
plain 3D tensor
Definition: mkldnn_types.h:185
LRN within a single channel.
runtime estimation (seconds)
Definition: mkldnn_types.h:1503
memory::desc diff_weights_desc() const
Queries diff weights (scale and shift) memory descriptor.
Definition: mkldnn.hpp:3440
Primitive descriptor for convolution weight update.
Definition: mkldnn.hpp:2282
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:2723
mkldnn_status_t MKLDNN_API mkldnn_shuffle_backward_desc_init(mkldnn_shuffle_desc_t *shuffle_desc, const mkldnn_memory_desc_t *diff_data_desc, int axis, mkldnn_dim_t group_size)
Initializes a shuffle_desc for backward propagation using memory descriptor diff_data_desc, axis, and group_size.
An element-wise primitive.
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: mkldnn.hpp:2057
4D CNN weights tensor, an alias to mkldnn_bcda
Definition: mkldnn_types.h:377
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: mkldnn.hpp:3877
memory::desc diff_src_iter_desc() const
Queries diff source iteration memory descriptor.
Definition: mkldnn.hpp:4537
Unidirectional execution of RNN primitive from right to left.
Definition: mkldnn_types.h:1173
4D CNN activations tensor, an alias to mkldnn::memory::format_tag::acdb
GRU cell with linear before reset.
Definition: mkldnn_types.h:708
desc(const dims &adims, data_type adata_type, format_tag aformat_tag)
Constructs a memory descriptor.
Definition: mkldnn.hpp:1344
LSTM cell.
Definition: mkldnn_types.h:698
mkldnn_status_t MKLDNN_API mkldnn_batch_normalization_backward_desc_init(mkldnn_batch_normalization_desc_t *bnrm_desc, mkldnn_prop_kind_t prop_kind, const mkldnn_memory_desc_t *diff_data_desc, const mkldnn_memory_desc_t *data_desc, float epsilon, unsigned flags)
Initializes a batch normalization descriptor bnrm_desc for backward propagation with respect to data ...
4D CNN activations tensor, an alias to mkldnn::memory::format_tag::abcd
Backward propagation (with respect to all parameters).
memory::desc diff_dst_iter_desc() const
Queries diff destination iteration memory descriptor.
Definition: mkldnn.hpp:4852
memory::desc diff_weights_iter_desc() const
Queries diff weights iteration memory descriptor.
Definition: mkldnn.hpp:4255
primitive_desc(const desc &desc, const engine &e)
Initializes a primitive descriptor for batch normalization forward propagation.
Definition: mkldnn.hpp:3294
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &src_iter_c_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &dst_iter_c_desc, const memory::desc &diff_src_layer_desc, const memory::desc &diff_src_iter_desc, const memory::desc &diff_src_iter_c_desc, const memory::desc &diff_weights_layer_desc, const memory::desc &diff_weights_iter_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_layer_desc, const memory::desc &diff_dst_iter_desc, const memory::desc &diff_dst_iter_c_desc, rnn_flags flags=rnn_flags::undef)
Initializes an LSTM descriptor for backward propagation using prop_kind, direction, and memory descriptors.
Definition: mkldnn.hpp:4119
stream(const engine &aengine, flags aflags=flags::default_flags)
Constructs a stream.
Definition: mkldnn.hpp:925
Undefined data type, used for empty memory descriptors.
Definition: mkldnn_types.h:70
memory::desc diff_weights_desc() const
Queries diff weights memory descriptor.
Definition: mkldnn.hpp:2302
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:3780
memory::desc dst_iter_c_desc() const
Queries destination recurrent cell state memory descriptor.
Definition: mkldnn.hpp:4219
Deconvolution backward propagation.
Definition: mkldnn.hpp:2502
Initializes an eltwise descriptor for forward propagation using prop_kind (possible values are mkldnn...
Definition: mkldnn.hpp:3043
A shuffle primitive.
Definition: mkldnn_types.h:617
4D CNN activations tensor, an alias to mkldnn_acdb
Definition: mkldnn_types.h:350
size_t get_size() const
Returns the number of bytes required to allocate the memory described including the padding area...
Definition: mkldnn.hpp:1387
int len() const
Returns the length of post operations.
Definition: mkldnn.hpp:570
memory::desc variance_desc() const
Queries variance memory descriptor.
Definition: mkldnn.hpp:3330
destination grad. memory desc
Definition: mkldnn_types.h:1536
#define MKLDNN_MAX_NDIMS
Maximum number of dimensions a tensor can have.
Definition: mkldnn_types.h:757
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for dilated deconvolution weight update without bias using aalgorithm...
Definition: mkldnn.hpp:2687
mkldnn_status_t MKLDNN_API mkldnn_primitive_get_primitive_desc(const_mkldnn_primitive_t primitive, const_mkldnn_primitive_desc_t *primitive_desc)
Retrieves a reference to the primitive_desc descriptor of given primitive.
mkldnn_normalization_flags_t
Flags for batch normalization primitive.
Definition: mkldnn_types.h:712
mkldnn_status_t MKLDNN_API mkldnn_post_ops_get_params_eltwise(const_mkldnn_post_ops_t post_ops, int index, float *scale, mkldnn_alg_kind_t *alg, float *alpha, float *beta)
Gets the eltwise parameters of the post operation with index index in the sequence of post_ops...
Primitive descriptor for deconvolution forward propagation.
Definition: mkldnn.hpp:2454
mkldnn_status_t MKLDNN_API mkldnn_reorder_primitive_desc_create(mkldnn_primitive_desc_t *reorder_primitive_desc, const mkldnn_memory_desc_t *src_md, mkldnn_engine_t src_engine, const mkldnn_memory_desc_t *dst_md, mkldnn_engine_t dst_engine, const_mkldnn_primitive_attr_t attr)
Initializes a reorder_primitive_desc using the description of the source (src_engine and src_md) and ...
permuted 5D tensor
Definition: mkldnn_types.h:192
Primitive descriptor for inner product backward propagation with respect to weights.
Definition: mkldnn.hpp:3625
mkldnn_status_t MKLDNN_API mkldnn_post_ops_get_params_sum(const_mkldnn_post_ops_t post_ops, int index, float *scale)
Gets the parameters of the accumulation (sum) post operation with index index in the sequence of post...
A (out-of-place) concat primitive.
Definition: mkldnn_types.h:619
memory::desc diff_dst_layer_desc() const
Queries diff destination layer memory descriptor.
Definition: mkldnn.hpp:3943
memory::desc diff_src_layer_desc() const
Queries diff source layer memory descriptor.
Definition: mkldnn.hpp:4529
memory::desc diff_src_iter_c_desc() const
Queries diff source recurrent cell state memory descriptor.
Definition: mkldnn.hpp:4245
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:2468
mkldnn_status_t MKLDNN_API mkldnn_stream_wait(mkldnn_stream_t stream)
Waits for all primitives in the execution stream to finish.
static size_t get_count(kind akind)
Returns the number of engines of a certain kind.
Definition: mkldnn.hpp:801
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: mkldnn.hpp:4795
mkldnn_query_t
Primitive descriptor query specification.
Definition: mkldnn_types.h:1494
A descriptor of a Batch Normalization operation.
Definition: mkldnn_types.h:1107
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: mkldnn.hpp:4663
workspace memory desc
Definition: mkldnn_types.h:1537
engine get_engine() const
Returns the engine of the memory.
Definition: mkldnn.hpp:1429
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: mkldnn.hpp:3072
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: mkldnn.hpp:2579
mkldnn_status_t MKLDNN_API mkldnn_dilated_deconvolution_backward_data_desc_init(mkldnn_deconvolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *diff_src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t dilates, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a dilated deconvolution descriptor conv_desc for backward propagation with respect to dat...
A sum primitive.
Definition: mkldnn_types.h:621
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: mkldnn.hpp:4368
memory::dim query_s64(query q) const
Queries the memory::dim value (same as int64_t)
Definition: mkldnn.hpp:1835
A user shall query and provide the scratchpad memory to primitives.
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: mkldnn.hpp:3423
normalization_flags
Flags for batch normalization primitive.
Definition: mkldnn.hpp:352
Primitive descriptor for GRU forward propagation.
Definition: mkldnn.hpp:4339
GRU descriptor for backward propagation.
Definition: mkldnn.hpp:4412
Undefined memory format kind, used for empty memory descriptors.
Definition: mkldnn_types.h:88
Convolution algorithm(either direct or Winograd) is chosen just in time.
Definition: mkldnn_types.h:652
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: mkldnn.hpp:4025
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: mkldnn.hpp:4169
memory consumption – extra (scratch) memory, additional to all inputs and outputs memory (bytes) ...
Definition: mkldnn_types.h:1504
An batch normalization primitive.
Definition: mkldnn_types.h:635
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: mkldnn.hpp:4777
A class for wrapping an Intel(R) MKL-DNN handle.
Definition: mkldnn.hpp:94
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: mkldnn.hpp:3752
engine(kind akind, size_t index)
Constructs an engine.
Definition: mkldnn.hpp:811
desc(const dims &adims, data_type adata_type, const dims &astrides)
Constructs a memory descriptor by strides.
Definition: mkldnn.hpp:1358
The library manages scratchpad (default)
mkldnn_status_t MKLDNN_API mkldnn_primitive_attr_get_scratchpad_mode(const_mkldnn_primitive_attr_t attr, mkldnn_scratchpad_mode_t *mode)
Returns the scratchpad mode set in the attribute attr.
Element-wise operations for forward propagation.
Definition: mkldnn.hpp:3037
desc(algorithm aalgorithm, const memory::desc &data_desc, const memory::desc &diff_data_desc, memory::dim local_size, float alpha, float beta, float k=1.f)
Initializes a descriptor for backward propagation using aalgorithm, memory descriptors data_desc and ...
Definition: mkldnn.hpp:2829
A descriptor of a pooling operation.
Definition: mkldnn_types.h:1048
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:2941
5D CNN weights tensor, an alias to mkldnn_cdeba
Definition: mkldnn_types.h:383
An execution stream.
Definition: mkldnn.hpp:906
1D tensor, an alias to mkldnn_a
Definition: mkldnn_types.h:338
mkldnn_status_t MKLDNN_API mkldnn_lstm_backward_desc_init(mkldnn_rnn_desc_t *rnn_desc, mkldnn_prop_kind_t prop_kind, mkldnn_rnn_direction_t direction, const mkldnn_memory_desc_t *src_layer_desc, const mkldnn_memory_desc_t *src_iter_desc, const mkldnn_memory_desc_t *src_iter_c_desc, const mkldnn_memory_desc_t *weights_layer_desc, const mkldnn_memory_desc_t *weights_iter_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_layer_desc, const mkldnn_memory_desc_t *dst_iter_desc, const mkldnn_memory_desc_t *dst_iter_c_desc, const mkldnn_memory_desc_t *diff_src_layer_desc, const mkldnn_memory_desc_t *diff_src_iter_desc, const mkldnn_memory_desc_t *diff_src_iter_c_desc, const mkldnn_memory_desc_t *diff_weights_layer_desc, const mkldnn_memory_desc_t *diff_weights_iter_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_layer_desc, const mkldnn_memory_desc_t *diff_dst_iter_desc, const mkldnn_memory_desc_t *diff_dst_iter_c_desc, unsigned flags)
Initializes an LSTM descriptor rnn_desc for backward propagation using prop_kind, direction...
mkldnn_status_t MKLDNN_API mkldnn_concat_primitive_desc_create(mkldnn_primitive_desc_t *concat_primitive_desc, const mkldnn_memory_desc_t *dst_md, int n, int concat_dimension, const mkldnn_memory_desc_t *src_mds, const_mkldnn_primitive_attr_t attr, mkldnn_engine_t engine)
Creates out-of-place concat_primitive_desc for concatenation of n inputs by concat_dimension with res...
mkldnn_status_t MKLDNN_API mkldnn_primitive_attr_set_scratchpad_mode(mkldnn_primitive_attr_t attr, mkldnn_scratchpad_mode_t mode)
Sets scratchpad mode.
An batch normalization primitive.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e, const deconvolution_forward::primitive_desc &hint_fwd_pd)
Initializes a primitive descriptor for deconvolution weight update with attributes defined by attr...
Definition: mkldnn.hpp:2718
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:3005
const char * impl_info_str() const
Returns implementation name.
Definition: mkldnn.hpp:1826
deconvolution descriptor
Definition: mkldnn_types.h:1518
memory::desc dst_iter_desc() const
Queries destination recurrent hidden state memory descriptor.
Definition: mkldnn.hpp:4214
Forward data propagation (inference mode).
desc(prop_kind aprop_kind, const memory::desc &src_desc, float epsilon, normalization_flags flags)
Initializes a batch normalization descriptor for forward propagation using prop_kind (possible values...
Definition: mkldnn.hpp:3277
memory(const desc &md, const engine &aengine)
Constructs a memory.
Definition: mkldnn.hpp:1417
mkldnn_memory_desc_t data
The underlying C API data structure.
Definition: mkldnn.hpp:1334
mkldnn_primitive_desc_t MKLDNN_API mkldnn_primitive_desc_iterator_fetch(const_mkldnn_primitive_desc_iterator_t iterator)
Fetches the current primitive descriptor.
memory::desc src_iter_c_desc() const
Queries source recurrent cell state memory descriptor.
Definition: mkldnn.hpp:4183
Weights format used in 8bit Winograd convolution.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e)
Initializes a primitive descriptor for convolution forward propagation with attributes defined by att...
Definition: mkldnn.hpp:2035
8-bit signed integer.
Definition: mkldnn_types.h:80
Primitive descriptor for eltwise forward propagation.
Definition: mkldnn.hpp:3056
mkldnn_primitive_kind_t
Kinds of primitives.
Definition: mkldnn_types.h:611
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e, const deconvolution_forward::primitive_desc &hint_fwd_pd)
Initializes a primitive descriptor for deconvolution backward propagation with attributes defined by ...
Definition: mkldnn.hpp:2569
Primitive descriptor for shuffle forward propagation.
Definition: mkldnn.hpp:4892
Winograd deconvolution.
Definition: mkldnn_types.h:656
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for dilated convolution forward propagation with bias using prop_kind (possi...
Definition: mkldnn.hpp:2002
3D tensor blocked by 2nd dimension with block size 4
Definition: mkldnn_types.h:217
number of inputs expected
Definition: mkldnn_types.h:1500
memory::desc diff_weights_iter_desc() const
Queries diff weights iteration memory descriptor.
Definition: mkldnn.hpp:4834
Forward data propagation (training mode).
mkldnn_rnn_flags_t
Flags for RNN cell.
Definition: mkldnn_types.h:1164
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: mkldnn.hpp:4349
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:3303
16-bit/half-precision floating point.
Definition: mkldnn_types.h:72
handle(T t, bool weak=false)
Constructs a C handle wrapper.
Definition: mkldnn.hpp:108
mkldnn_status_t MKLDNN_API mkldnn_deconvolution_backward_weights_desc_init(mkldnn_deconvolution_desc_t *conv_desc, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *diff_weights_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a deconvolution descriptor conv_desc for backward propagation with respect to weights usi...
memory::desc diff_src_layer_desc() const
Queries diff source layer memory descriptor.
Definition: mkldnn.hpp:3915
Descriptor for batch normalization backward propagation.
Definition: mkldnn.hpp:3357
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e)
Initializes a primitive descriptor for batch normalization forward propagation with attributes define...
Definition: mkldnn.hpp:3299
Descriptor for batch normalization forward propagation.
Definition: mkldnn.hpp:3266
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: mkldnn.hpp:3747
memory::desc diff_src_iter_desc() const
Queries diff source iteration memory descriptor.
Definition: mkldnn.hpp:3923
primitive_desc(const desc &desc, const engine &e)
Initializes a primitive descriptor for deconvolution forward propagation.
Definition: mkldnn.hpp:2459
void * get_data_handle() const
Returns a handle of the data contained in the memory.
Definition: mkldnn.hpp:1439
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: mkldnn.hpp:4676
Weights format used in 8bit Winograd convolution.
Definition: mkldnn_types.h:97
4D CNN activations tensor blocked by channels with block size 16, an alias to mkldnn_aBcd16b ...
Definition: mkldnn_types.h:444
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:3637
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:3430
memory::desc dst_iter_desc() const
Queries destination recurrent hidden state memory descriptor.
Definition: mkldnn.hpp:4070
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, memory::dim local_size, float alpha, float beta, float k=1.f)
Initializes a descriptor for forward propagation using prop_kind (possible values are mkldnn::forward...
Definition: mkldnn.hpp:2773
Vanilla RNN for forward propagation.
Definition: mkldnn.hpp:3674
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: mkldnn.hpp:4381
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: mkldnn.hpp:4636
Descriptor for convolution weight update.
Definition: mkldnn.hpp:2175
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: mkldnn.hpp:2584
number of inputs expected
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: mkldnn.hpp:4503
memory::desc diff_src_desc() const
Queries diff source memory descriptor.
Definition: mkldnn.hpp:3435
Bidirectional execution of RNN primitive with concatenation of the results.
Definition: mkldnn_types.h:1176
desc get_desc() const
Returns the descriptor of the memory.
Definition: mkldnn.hpp:1421
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: mkldnn.hpp:4803
permuted 2D tensor
Definition: mkldnn_types.h:197
5D CNN weights tensor (incl. groups), an alias to mkldnn_acbde
Definition: mkldnn_types.h:396
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:3067
4D tensor blocked by 2nd dimension with block size 8
Average pooling exclude padding.
Definition: mkldnn_types.h:689
mkldnn_status_t MKLDNN_API mkldnn_primitive_attr_get_post_ops(const_mkldnn_primitive_attr_t attr, const_mkldnn_post_ops_t *post_ops)
Returns post_ops for given attr.
primitive::kind kind(int index) const
Returns the kind of post operation with index index.
Definition: mkldnn.hpp:573
Forward data propagation (inference mode).
Definition: mkldnn_types.h:594
Convolution algorithm(either direct or Winograd) is chosen just in time.
Descriptor for GRU forward propagation.
Definition: mkldnn.hpp:4295
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for convolution forward propagation with bias using prop_kind (possible valu...
Definition: mkldnn.hpp:1946
memory::desc diff_weights_layer_desc() const
Queries diff weights layer memory descriptor.
Definition: mkldnn.hpp:3928
A class that provides the destructor for an Intel(R) MKL-DNN C handle.
Definition: mkldnn.hpp:79
data_type
Data type specification.
Definition: mkldnn.hpp:1003
4D CNN activations tensor blocked by channels with block size 8, an alias to mkldnn_aBcd8b ...
Definition: mkldnn_types.h:450
5D CNN weights tensor (incl. groups), an alias to mkldnn_decab
Definition: mkldnn_types.h:394
Direct deconvolution.
Definition: mkldnn_types.h:654
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:4082
Eltwise: abs.
Definition: mkldnn_types.h:666
2D CNN weights tensor, an alias to mkldnn_ab
Definition: mkldnn_types.h:359
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: mkldnn.hpp:2312
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: mkldnn.hpp:2473
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:2865
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: mkldnn.hpp:3765
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: mkldnn.hpp:3903
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for dilated convolution weight update with bias using aalgorithm, memory descriptors, strides, dilates padding_l, and padding_r.
Definition: mkldnn.hpp:2232
Local response normalization (LRN) across multiple channels.
A memory descriptor.
Definition: mkldnn.hpp:1331
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: mkldnn.hpp:3773
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: mkldnn.hpp:4782
mkldnn_status_t MKLDNN_API mkldnn_primitive_attr_get_output_scales(const_mkldnn_primitive_attr_t attr, mkldnn_dim_t *count, int *mask, const float **scales)
Returns count, correspondence scale mask, and a pointer to a constant floating point array of output ...
An inner product primitive.
non-standard 16-bit (bfloat16 w/ 7 bit mantissa) floating point.
void set_rnn_weights_qparams(int mask, const std::vector< float > &scales)
Sets quantization scales weights_scales for RNN weights tensors.
Definition: mkldnn.hpp:761
Eltwise: hyperbolic tangent non-linearity (tanh)
Definition: mkldnn_types.h:660
Undefined memory format tag.
Definition: mkldnn_types.h:175
desc(algorithm aalgorithm, const memory::desc &diff_src_desc, const memory::desc &weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for deconvolution backward propagation using aalgorithm, memory descriptors...
Definition: mkldnn.hpp:2514
mkldnn_status_t MKLDNN_API mkldnn_engine_get_kind(mkldnn_engine_t engine, mkldnn_engine_kind_t *kind)
Returns the kind of an engine.
mkldnn_status_t MKLDNN_API mkldnn_engine_destroy(mkldnn_engine_t engine)
Destroys an engine.
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:4523
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:3398
primitive_desc(const desc &desc, const engine &e, const batch_normalization_forward::primitive_desc &hint_fwd_pd)
Initializes a primitive descriptor for batch normalization backward propagation.
Definition: mkldnn.hpp:3387
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: mkldnn.hpp:2998
plain 2D tensor
Definition: mkldnn_types.h:184
4D CNN activations tensor, an alias to mkldnn_bcda
Definition: mkldnn_types.h:352
memory::desc diff_src_layer_desc() const
Queries diff source layer memory descriptor.
Definition: mkldnn.hpp:4232
5D tensor blocked by 2nd dimension with block size 4
Definition: mkldnn_types.h:267
Primitive or engine failed on execution.
Definition: mkldnn_types.h:62
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: mkldnn.hpp:4057
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: mkldnn.hpp:4260
stream & wait()
Waits for all primitives in the stream to finish.
Definition: mkldnn.hpp:955
Primitive descriptor for convolution forward propagation.
Definition: mkldnn.hpp:2025
mkldnn_status_t MKLDNN_API mkldnn_deconvolution_forward_desc_init(mkldnn_deconvolution_desc_t *conv_desc, mkldnn_prop_kind_t prop_kind, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a deconvolution descriptor deconv_desc for forward propagation using prop_kind (possible ...
4D CNN activations tensor blocked by channels with block size 4, an alias to mkldnn_aBcd4b ...
Definition: mkldnn_types.h:447
permuted 5D tensor
Definition: mkldnn_types.h:206
memory::desc diff_src_desc() const
Queries diff source gradient memory descriptor.
Definition: mkldnn.hpp:2146
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: mkldnn.hpp:4363
An LRN primitive.
Definition: mkldnn_types.h:633
source gradient memory desc
mkldnn_status_t MKLDNN_API mkldnn_memory_get_engine(const_mkldnn_memory_t memory, mkldnn_engine_t *engine)
Returns an engine associated with memory.
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:4396
Placeholder memory format tag.
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:4683
mkldnn_status_t MKLDNN_API mkldnn_sum_primitive_desc_create(mkldnn_primitive_desc_t *sum_primitive_desc, const mkldnn_memory_desc_t *dst_mds, int n, const float *scales, const mkldnn_memory_desc_t *src_mds, const_mkldnn_primitive_attr_t attr, mkldnn_engine_t engine)
Creates out-of-place sum_primitive_desc for sum of n inputs multiplied by scale with resulting output...
desc(const memory::desc &diff_desc, const memory::desc &data_desc, int softmax_axis)
Initializes a softmax descriptor for backward propagation using memory descriptors diff_desc and data...
Definition: mkldnn.hpp:3200
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: mkldnn.hpp:3320
void get_output_scales(int &mask, std::vector< float > &scales) const
Gets correspondence scale mask and a constant floating point vector of output scales previously set b...
Definition: mkldnn.hpp:674
Primitive descriptor for LBR_GRU forward propagation.
Definition: mkldnn.hpp:4626
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: mkldnn.hpp:3895
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: mkldnn.hpp:4650
weights memory descriptor desc
Definition: mkldnn_types.h:1533
Descriptor for deconvolution backward propagation.
Definition: mkldnn.hpp:2505
5D RNN weights tensor in the format (num_layers, num_directions, input_channels, num_gates, output_channels).
Definition: mkldnn_types.h:413
3D tensor blocked by 2nd dimension with block size 8
Definition: mkldnn_types.h:223
memory::desc diff_src_iter_desc() const
Queries diff source iteration memory descriptor.
Definition: mkldnn.hpp:4824
Inner product for backward propagation with respect to weights.
Definition: mkldnn.hpp:3593
shuffle descriptor
Definition: mkldnn_types.h:1519
Forward data propagation (training mode).
Definition: mkldnn_types.h:590
mkldnn_status_t MKLDNN_API mkldnn_gru_backward_desc_init(mkldnn_rnn_desc_t *rnn_desc, mkldnn_prop_kind_t prop_kind, mkldnn_rnn_direction_t direction, const mkldnn_memory_desc_t *src_layer_desc, const mkldnn_memory_desc_t *src_iter_desc, const mkldnn_memory_desc_t *weights_layer_desc, const mkldnn_memory_desc_t *weights_iter_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_layer_desc, const mkldnn_memory_desc_t *dst_iter_desc, const mkldnn_memory_desc_t *diff_src_layer_desc, const mkldnn_memory_desc_t *diff_src_iter_desc, const mkldnn_memory_desc_t *diff_weights_layer_desc, const mkldnn_memory_desc_t *diff_weights_iter_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_layer_desc, const mkldnn_memory_desc_t *diff_dst_iter_desc, unsigned flags)
Initializes a GRU descriptor rnn_desc for backward propagation using prop_kind, direction, and memory descriptors.
plain 4D tensor
Definition: mkldnn_types.h:186
3D CNN weights tensor, an alias to mkldnn_abc
Definition: mkldnn_types.h:363
5D CNN activations tensor blocked by channels with block size 16, an alias to mkldnn_aBcde16b ...
Definition: mkldnn_types.h:435
mkldnn_status_t MKLDNN_API mkldnn_gru_forward_desc_init(mkldnn_rnn_desc_t *rnn_desc, mkldnn_prop_kind_t prop_kind, mkldnn_rnn_direction_t direction, const mkldnn_memory_desc_t *src_layer_desc, const mkldnn_memory_desc_t *src_iter_desc, const mkldnn_memory_desc_t *weights_layer_desc, const mkldnn_memory_desc_t *weights_iter_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_layer_desc, const mkldnn_memory_desc_t *dst_iter_desc, unsigned flags)
Initializes a GRU descriptor rnn_desc for forward propagation using prop_kind, direction, and memory descriptors.
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: mkldnn.hpp:4552
weights grad. memory desc
Definition: mkldnn_types.h:1534
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: mkldnn.hpp:3231
LBR_GRU descriptor for backward propagation.
Definition: mkldnn.hpp:4699
Backward bias propagation.
post_ops()
Creates an empty sequence of post operations.
Definition: mkldnn.hpp:562
Descriptor for LBR GRU forward propagation.
Definition: mkldnn.hpp:4582
2D CNN activations tensor, an alias to mkldnn_ba
Definition: mkldnn_types.h:342
An opaque structure to describe a primitive.
void set_scratchpad_mode(scratchpad_mode mode)
Sets scratchpad mode.
Definition: mkldnn.hpp:666
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &bias_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for dilated convolution forward propagation without bias using prop_kind (po...
Definition: mkldnn.hpp:1972
Primitive descriptor for RNN forward propagation.
Definition: mkldnn.hpp:3724
mkldnn_data_type_t
Data type specification.
Definition: mkldnn_types.h:68
Convolution backward propagation.
Definition: mkldnn.hpp:2073
memory::desc diff_weights_desc() const
Queries diff weights memory descriptor.
Definition: mkldnn.hpp:2728
Undefined memory format tag.
Definition: mkldnn_types.h:172
convolution descriptor
Definition: mkldnn_types.h:1517
Primitive descriptor for RNN backward propagation.
Definition: mkldnn.hpp:3852
plain 5D tensor
Definition: mkldnn_types.h:187
GRU for backward propagation.
Definition: mkldnn.hpp:4409
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e, const convolution_forward::primitive_desc &hint_fwd_pd)
Initializes primitive descriptor for convolution backward propagation with attributes defined by attr...
Definition: mkldnn.hpp:2141
Primitive descriptor for softmax backward propagation.
Definition: mkldnn.hpp:3209
primitive_desc(const desc &desc, const engine &e, const convolution_forward::primitive_desc &hint_fwd_pd)
Initializes primitive descriptor for convolution backward propagation.
Definition: mkldnn.hpp:2135
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: mkldnn.hpp:3882
mkldnn_status_t MKLDNN_API mkldnn_memory_desc_init_submemory(mkldnn_memory_desc_t *memory_desc, const mkldnn_memory_desc_t *parent_memory_desc, const mkldnn_dims_t dims, const mkldnn_dims_t offsets)
Initializes a memory_desc for a given parent_memory_desc, with dims sizes and offsets.
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:2795
Eltwise: bounded_relu.
Definition: mkldnn_types.h:672
Descriptor for softmax forward propagation.
Definition: mkldnn.hpp:3149
memory::desc diff_src_iter_desc() const
Queries diff source recurrent hidden state memory descriptor.
Definition: mkldnn.hpp:4240
mkldnn_engine_kind_t
Kinds of engines.
Definition: mkldnn_types.h:1256
memory::desc diff_dst_layer_desc() const
Queries diff destination layer memory descriptor.
Definition: mkldnn.hpp:4844
memory::desc diff_src_desc() const
Queries diff source memory descriptor.
Definition: mkldnn.hpp:2993
destination memory desc
Definition: mkldnn_types.h:1535
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: mkldnn.hpp:4905
Memory that describes the data.
Definition: mkldnn.hpp:993
memory::desc diff_src_desc() const
Queries diff source gradient memory descriptor.
Definition: mkldnn.hpp:3571
3D CNN activations tensor blocked by channels with block size 4, an alias to mkldnn_aBc4b ...
Definition: mkldnn_types.h:456
Local response normalization for backward propagation.
Definition: mkldnn.hpp:2819
memory::desc diff_dst_iter_desc() const
Queries diff destination iteration memory descriptor.
Definition: mkldnn.hpp:3951
Deconvolution forward propagation.
Definition: mkldnn.hpp:2336
const void * const_mkldnn_op_desc_t
A pointer to any of the operation descriptors (constant variant).
Definition: mkldnn_types.h:935
runtime estimation (seconds), unimplemented
Deconvolution weight update.
Definition: mkldnn.hpp:2600
destination grad. memory desc
Batch normalization for forward propagation.
Definition: mkldnn.hpp:3263
A reorder primitive.
Definition: mkldnn_types.h:615
void unmap_data(void *mapped_ptr) const
Unmaps the previously mapped data for the memory.
Definition: mkldnn.hpp:1482
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e)
Initializes primitive descriptor for deconvolution forward propagation with attributes defined by att...
Definition: mkldnn.hpp:2464
4D CNN weights tensor, an alias to mkldnn_cdba
Definition: mkldnn_types.h:373
An unspecified engine.
Definition: mkldnn_types.h:1258
desc(const mkldnn_memory_desc_t &adata)
Constructs a memory descriptor from a C API data structure.
Definition: mkldnn.hpp:1371
int MKLDNN_API mkldnn_post_ops_len(const_mkldnn_post_ops_t post_ops)
Returns the length of post operations for given post_ops.
Undefined memory format tag.
The library manages scratchpad (default)
Definition: mkldnn_types.h:1316
mkldnn_alg_kind_t
Kinds of algorithms.
Definition: mkldnn_types.h:645
Bidirectional execution of RNN primitive with summation of the results.
Definition: mkldnn_types.h:1179
LBR_GRU for backward propagation.
Definition: mkldnn.hpp:4696
Vanilla RNN for backward propagation.
Definition: mkldnn.hpp:3793
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: mkldnn.hpp:4188
4D CNN weights tensor, an alias to mkldnn_bacd
Definition: mkldnn_types.h:379
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: mkldnn.hpp:2858
inner product descriptor
Definition: mkldnn_types.h:1525
A pooling primitive.
Definition: mkldnn_types.h:631
Primitive descriptor for pooling backward propagation.
Definition: mkldnn.hpp:2981
mkldnn_status_t MKLDNN_API mkldnn_primitive_create(mkldnn_primitive_t *primitive, const_mkldnn_primitive_desc_t primitive_desc)
Creates a primitive using a primitive_desc descriptor.
const mkldnn_memory_desc_t MKLDNN_API * mkldnn_primitive_desc_query_md(const_mkldnn_primitive_desc_t primitive_desc, mkldnn_query_t what, int index)
Queries primitive descriptor for memory descriptor.
mkldnn_status_t MKLDNN_API mkldnn_primitive_destroy(mkldnn_primitive_t primitive)
Deletes a primitive.
permuted 4D tensor
Definition: mkldnn_types.h:199
plain 1D tensor
Definition: mkldnn_types.h:183
Shuffle for forward propagation.
Definition: mkldnn.hpp:4873
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: mkldnn.hpp:2934
4D CNN weights tensor (incl. groups), an alias to mkldnn_abcd
Definition: mkldnn_types.h:390
mkldnn_status_t MKLDNN_API mkldnn_convolution_forward_desc_init(mkldnn_convolution_desc_t *conv_desc, mkldnn_prop_kind_t prop_kind, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a convolution descriptor conv_desc for forward propagation using prop_kind (possible valu...
Primitive descriptor for batch normalization forward propagation.
Definition: mkldnn.hpp:3289
4D tensor blocked by 2nd dimension with block size 8
Definition: mkldnn_types.h:245
static void wrap_c_api(mkldnn_status_t status, const char *message)
A convenience function for wrapping calls to the C API.
Definition: mkldnn.hpp:72
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: mkldnn.hpp:2052
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: mkldnn.hpp:2156
permuted 5D tensor
Definition: mkldnn_types.h:205
Forward data propagation (alias for mkldnn_forward_training).
Definition: mkldnn_types.h:598
lrn descriptor
Definition: mkldnn_types.h:1523
4D tensor blocked by 2nd dimension with block size 4
Definition: mkldnn_types.h:237
memory::desc src_desc() const
Queries source memory descriptor.
Definition: mkldnn.hpp:2297
bool next_impl()
Advances the next implementation for the given op descriptor.
Definition: mkldnn.hpp:1848
mkldnn_status_t MKLDNN_API mkldnn_inner_product_backward_weights_desc_init(mkldnn_inner_product_desc_t *ip_desc, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *diff_weights_desc, const mkldnn_memory_desc_t *diff_bias_desc, const mkldnn_memory_desc_t *diff_dst_desc)
Initializes an inner product descriptor ip_desc for backward propagation with respect to weights usin...
handle()
Empty constructor.
Definition: mkldnn.hpp:121
plain 6D tensor
Definition: mkldnn_types.h:188
const char * what() const noexcept override
Returns the explanatory string.
Definition: mkldnn.hpp:65
GRU for forward propagation.
Definition: mkldnn.hpp:4292
mkldnn_status_t MKLDNN_API mkldnn_dilated_deconvolution_forward_desc_init(mkldnn_deconvolution_desc_t *conv_desc, mkldnn_prop_kind_t prop_kind, mkldnn_alg_kind_t alg_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_desc, const mkldnn_dims_t strides, const mkldnn_dims_t dilates, const mkldnn_dims_t padding_l, const mkldnn_dims_t padding_r)
Initializes a dilated deconvolution descriptor deconv_desc for forward propagation using prop_kind (p...
mkldnn_status_t MKLDNN_API mkldnn_primitive_attr_set_rnn_weights_qparams(mkldnn_primitive_attr_t attr, mkldnn_dim_t count, int mask, const float *weights_scales)
Sets quantization scales weights_scales for RNN weights tensors.
Undefined memory format kind, used for empty memory descriptors.
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &bias_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Initializes a descriptor for deconvolution forward propagation with bias using prop_kind (possible va...
Definition: mkldnn.hpp:2350
int64_t mkldnn_dim_t
A type to describe tensor dimension.
Definition: mkldnn_types.h:760
void append_eltwise(float scale, algorithm alg, float alpha, float beta)
Appends eltwise post operation.
Definition: mkldnn.hpp:621
source gradient memory desc
Definition: mkldnn_types.h:1532
2D CNN weights tensor, an alias to mkldnn_ba
Definition: mkldnn_types.h:361
primitive kind
Definition: mkldnn_types.h:1498
memory::desc diff_src_desc() const
Queries diff source memory descriptor.
Definition: mkldnn.hpp:2853
An opaque structure to describe a primitive descriptor iterator.
mkldnn_status_t MKLDNN_API mkldnn_memory_desc_init_by_tag(mkldnn_memory_desc_t *memory_desc, int ndims, const mkldnn_dims_t dims, mkldnn_data_type_t data_type, mkldnn_format_tag_t tag)
Initializes a memory_desc memory descriptor using ndims, dims, data_type, and format tag...
mkldnn_status_t MKLDNN_API mkldnn_memory_get_data_handle(const_mkldnn_memory_t memory, void **handle)
For a memory, returns the data handle.
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: mkldnn.hpp:4062
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: mkldnn.hpp:2307
4D RNN states tensor in the format (num_layers, num_directions, batch, state channels).
Definition: mkldnn_types.h:406
mkldnn_status_t MKLDNN_API mkldnn_inner_product_forward_desc_init(mkldnn_inner_product_desc_t *ip_desc, mkldnn_prop_kind_t prop_kind, const mkldnn_memory_desc_t *src_desc, const mkldnn_memory_desc_t *weights_desc, const mkldnn_memory_desc_t *bias_desc, const mkldnn_memory_desc_t *dst_desc)
Initializes an inner product descriptor ip_desc for forward propagation using prop_kind (possible val...