23 #include "dnnl_config.h" 31 #include <unordered_map> 35 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL 52 struct error :
public std::exception {
61 : status(astatus), message(amessage) {}
64 const char *
what() const noexcept
override {
return message; }
93 template <
typename T,
typename traits = handle_traits<T>>
98 std::shared_ptr<typename std::remove_pointer<T>::type> _data {0};
101 bool operator==(
const T other)
const {
return other == _data.get(); }
102 bool operator!=(
const T other)
const {
return !(*
this == other); }
128 void reset(T t,
bool weak =
false) {
129 _data.reset(t, weak ? &dummy_destructor : traits::destructor);
133 T
get(
bool allow_emtpy =
false)
const {
134 T result = _data.get();
136 if (allow_emtpy ==
false && result ==
nullptr)
138 "attempt to use uninitialized object");
143 explicit operator T()
const {
return get(
true); }
145 explicit operator bool()
const {
return get(
true) !=
nullptr; }
147 bool operator==(
const handle &other)
const {
148 return other._data.get() == _data.get();
150 bool operator!=(
const handle &other)
const {
return !(*
this == other); }
178 struct primitive_desc;
232 stream &astream,
const std::unordered_map<int, memory> &args)
const;
242 "could not get primitive descriptor by primitive");
297 undef = dnnl_alg_kind_undef,
415 enum class rnn_flags : unsigned {
undef = dnnl_rnn_flags_undef };
421 #define DNNL_DEFINE_BITMASK_OPS(enum_name) \ 422 inline enum_name operator|(enum_name lhs, enum_name rhs) { \ 423 return static_cast<enum_name>( \ 424 static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); \ 427 inline enum_name operator&(enum_name lhs, enum_name rhs) { \ 428 return static_cast<enum_name>( \ 429 static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); \ 432 inline enum_name operator^(enum_name lhs, enum_name rhs) { \ 433 return static_cast<enum_name>( \ 434 static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); \ 437 inline enum_name &operator|=(enum_name &lhs, enum_name rhs) { \ 438 lhs = static_cast<enum_name>( \ 439 static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); \ 443 inline enum_name &operator&=(enum_name &lhs, enum_name rhs) { \ 444 lhs = static_cast<enum_name>( \ 445 static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); \ 449 inline enum_name &operator^=(enum_name &lhs, enum_name rhs) { \ 450 lhs = static_cast<enum_name>( \ 451 static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); \ 455 inline enum_name operator~(enum_name rhs) { \ 456 return static_cast<enum_name>(~static_cast<unsigned>(rhs)); \ 460 DNNL_DEFINE_BITMASK_OPS(rnn_flags)
462 #undef DNNL_DEFINE_BITMASK_OPS 464 enum class rnn_direction {
467 unidirectional = dnnl_unidirectional,
593 "could not create post operation sequence");
603 "post_ops index is out of range");
637 "could not get sum params");
650 get(), scale, convert_to_c(alg), alpha, beta),
651 "could not append eltwise");
656 float &alpha,
float &beta)
const {
659 get(), index, &scale, &c_alg, &alpha, &beta),
660 "could not get eltwise params");
682 "could not create a primitive attr");
697 "could not get scratchpad mode");
704 get(), dnnl::convert_to_c(mode)),
705 "could not set scratchpad mode");
713 const float *c_scales;
715 get(), &count, &c_mask, &c_scales),
716 "could not get int output scales");
717 scales.resize(count);
721 scales[c] = c_scales[c];
742 "could not set int output scales");
750 "could not get post operation sequence");
751 result.
reset(const_cast<dnnl_post_ops_t>(c_result),
true);
758 "could not set post operation sequence");
772 "could not set rnn data int scale/shift");
800 get(), (
int)scales.size(), mask, &scales[0]),
801 "could not set rnn weights int scales");
854 "could not create an engine");
858 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL 859 engine(
kind akind, cl_device_id device, cl_context context) {
865 "could not create an engine");
880 "could not get engine from primitive_desc");
881 reset(engine_q,
true);
888 "could not get the engine kind");
892 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL 895 cl_context context =
nullptr;
897 "could not get a context handle");
903 cl_device_id device =
nullptr;
905 "could not get a device handle");
910 template <
class primitive_desc>
920 template <
class primitive_desc>
921 static engine query(
const primitive_desc &pd,
dnnl::query what) {
924 dnnl::convert_to_c(what), 0, &engine_q),
925 "could not get engine from primitive_desc");
927 return engine(engine_q);
970 "could not create a stream");
974 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL 980 "could not create a stream");
986 cl_command_queue queue =
nullptr;
988 "could not get OpenCL command queue");
1002 static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs));
1007 static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs));
1012 static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs));
1016 return static_cast<stream::flags>(~static_cast<
unsigned>(rhs));
1033 typedef std::vector<dim> dims;
1035 template <
typename T>
1036 static void validate_dims(
const std::vector<T> &v) {
1116 Abc16a = dnnl_Abc16a,
1117 ABc16a16b = dnnl_ABc16a16b,
1119 ABc16b16a = dnnl_ABc16b16a,
1122 ABc4b16a4b = dnnl_ABc4b16a4b,
1123 ABc4b4a = dnnl_ABc4b4a,
1124 ABc8a16b2a = dnnl_ABc8a16b2a,
1125 ABc8a8b = dnnl_ABc8a8b,
1127 ABc8b16a2b = dnnl_ABc8b16a2b,
1128 ABc8b8a = dnnl_ABc8b8a,
1129 Abcd16a = dnnl_Abcd16a,
1130 ABcd16a16b = dnnl_ABcd16a16b,
1132 ABcd16b16a = dnnl_ABcd16b16a,
1133 aBCd16b16c = dnnl_aBCd16b16c,
1134 aBCd16c16b = dnnl_aBCd16c16b,
1135 Abcd4a = dnnl_Abcd4a,
1137 ABcd4b16a4b = dnnl_ABcd4b16a4b,
1138 ABcd4b4a = dnnl_ABcd4b4a,
1139 aBCd4c16b4c = dnnl_aBCd4c16b4c,
1140 aBCd4c4b = dnnl_aBCd4c4b,
1141 ABcd8a16b2a = dnnl_ABcd8a16b2a,
1142 ABcd8a8b = dnnl_ABcd8a8b,
1145 ABcd8b16a2b = dnnl_ABcd8b16a2b,
1146 aBCd8b16c2b = dnnl_aBCd8b16c2b,
1149 aBCd8b8c = dnnl_aBCd8b8c,
1150 aBCd8c16b2c = dnnl_aBCd8c16b2c,
1151 aBCd8c8b = dnnl_aBCd8c8b,
1152 Abcde16a = dnnl_Abcde16a,
1153 ABcde16a16b = dnnl_ABcde16a16b,
1155 ABcde16b16a = dnnl_ABcde16b16a,
1156 aBCde16b16c = dnnl_aBCde16b16c,
1157 aBCde16c16b = dnnl_aBCde16c16b,
1158 aBCde2c8b4c = dnnl_aBCde2c8b4c,
1159 Abcde4a = dnnl_Abcde4a,
1161 ABcde4b4a = dnnl_ABcde4b4a,
1162 aBCde4b4c = dnnl_aBCde4b4c,
1163 aBCde4c16b4c = dnnl_aBCde4c16b4c,
1164 aBCde4c4b = dnnl_aBCde4c4b,
1165 Abcde8a = dnnl_Abcde8a,
1166 ABcde8a8b = dnnl_ABcde8a8b,
1168 ABcde8b16a2b = dnnl_ABcde8b16a2b,
1169 aBCde8b16c2b = dnnl_aBCde8b16c2b,
1170 ABcde8b8a = dnnl_ABcde8b8a,
1171 aBCde8b8c = dnnl_aBCde8b8c,
1172 ABcd4a8b8a4b = dnnl_ABcd4a8b8a4b,
1173 ABcd2a8b8a2b = dnnl_ABcd2a8b8a2b,
1174 aBCde4b8c8b4c = dnnl_aBCde4b8c8b4c,
1175 aBCde2b8c8b2c = dnnl_aBCde2b8c8b2c,
1176 aBCde8c16b2c = dnnl_aBCde8c16b2c,
1177 aBCde8c8b = dnnl_aBCde8c8b,
1179 aBCdef16b16c = dnnl_aBCdef16b16c,
1180 aBCdef16c16b = dnnl_aBCdef16c16b,
1182 aBCdef4c4b = dnnl_aBCdef4c4b,
1183 aBCdef8b8c = dnnl_aBCdef8b8c,
1184 aBCdef8c16b2c = dnnl_aBCdef8c16b2c,
1185 aBCdef8c8b = dnnl_aBCdef8c8b,
1186 aBdc16b = dnnl_aBdc16b,
1187 aBdc4b = dnnl_aBdc4b,
1188 aBdc8b = dnnl_aBdc8b,
1189 aBdec16b = dnnl_aBdec16b,
1190 aBdec4b = dnnl_aBdec4b,
1191 aBdec8b = dnnl_aBdec8b,
1192 aBdefc16b = dnnl_aBdefc16b,
1193 aCBdef16c16b = dnnl_aCBdef16c16b,
1194 aBdefc4b = dnnl_aBdefc4b,
1195 aBdefc8b = dnnl_aBdefc8b,
1196 Acb16a = dnnl_Acb16a,
1199 aCBd16b16c = dnnl_aCBd16b16c,
1200 aCBd16c16b = dnnl_aCBd16c16b,
1201 aCBde16b16c = dnnl_aCBde16b16c,
1202 aCBde16c16b = dnnl_aCBde16c16b,
1203 Acdb16a = dnnl_Acdb16a,
1204 Acdb4a = dnnl_Acdb4a,
1205 Acdb8a = dnnl_Acdb8a,
1206 Acdeb16a = dnnl_Acdeb16a,
1207 Acdeb4a = dnnl_Acdeb4a,
1208 Acdeb8a = dnnl_Acdeb8a,
1209 BAc16a16b = dnnl_BAc16a16b,
1210 BAc16b16a = dnnl_BAc16b16a,
1211 BAcd16a16b = dnnl_BAcd16a16b,
1212 BAcd16b16a = dnnl_BAcd16b16a,
1213 ABcd32a32b = dnnl_ABcd32a32b,
1214 BAcde16b16 = dnnl_BAcde16b16a,
1215 aBdec32b = dnnl_aBdec32b,
1216 Abcdef16a = dnnl_Abcdef16a,
1217 Acdb32a = dnnl_Acdb32a,
1270 NCw16n16c = dnnl_NCw16n16c,
1271 NChw16n16c = dnnl_NChw16n16c,
1272 NCdhw16n16c = dnnl_NCdhw16n16c,
1273 NChw32n32c = dnnl_NChw32n32c,
1274 IOhw16i16o = dnnl_IOhw16i16o,
1275 Ohwi32o = dnnl_Ohwi32o,
1276 IOdhw16i16o = dnnl_IOdhw16i16o,
1277 gIOhw16i16o = dnnl_gIOhw16i16o,
1278 gOhwi32o = dnnl_gOhwi32o,
1279 Goidhw16g = dnnl_Goidhw16g,
1280 IOw16o16i = dnnl_IOw16o16i,
1281 OIw16i16o = dnnl_OIw16i16o,
1282 IOw16i16o = dnnl_IOw16i16o,
1283 gIOw16i16o = dnnl_gIOw16i16o,
1284 OIw16o16i = dnnl_OIw16o16i,
1285 Oiw16o = dnnl_Oiw16o,
1286 OIw4i16o4i = dnnl_OIw4i16o4i,
1287 OIw4i4o = dnnl_OIw4i4o,
1289 OIw8i16o2i = dnnl_OIw8i16o2i,
1290 OIw8i8o = dnnl_OIw8i8o,
1291 OIw8o16i2o = dnnl_OIw8o16i2o,
1292 OIw8o8i = dnnl_OIw8o8i,
1293 Owi16o = dnnl_Owi16o,
1296 IOhw16o16i = dnnl_IOhw16o16i,
1297 Ohwi16o = dnnl_Ohwi16o,
1298 Ohwi4o = dnnl_Ohwi4o,
1299 Ohwi8o = dnnl_Ohwi8o,
1300 OIhw16i16o = dnnl_OIhw16i16o,
1301 OIhw16o16i = dnnl_OIhw16o16i,
1302 Oihw16o = dnnl_Oihw16o,
1303 OIhw4i16o4i = dnnl_OIhw4i16o4i,
1304 OIhw4i4o = dnnl_OIhw4i4o,
1305 Oihw4o = dnnl_Oihw4o,
1306 OIhw8i16o2i = dnnl_OIhw8i16o2i,
1307 OIhw8i8o = dnnl_OIhw8i8o,
1308 OIhw8o16i2o = dnnl_OIhw8o16i2o,
1309 OIhw8o8i = dnnl_OIhw8o8i,
1310 Odhwi16o = dnnl_Odhwi16o,
1311 Odhwi4o = dnnl_Odhwi4o,
1312 Odhwi8o = dnnl_Odhwi8o,
1313 OIdhw16i16o = dnnl_OIdhw16i16o,
1314 OIdhw16o16i = dnnl_OIdhw16o16i,
1315 Oidhw16o = dnnl_Oidhw16o,
1316 OIdhw4i4o = dnnl_OIdhw4i4o,
1317 Oidhw4o = dnnl_Oidhw4o,
1318 OIdhw8i16o2i = dnnl_OIdhw8i16o2i,
1319 OIdhw8i8o = dnnl_OIdhw8i8o,
1320 OIdhw8o8i = dnnl_OIdhw8o8i,
1321 gIOw16o16i = dnnl_gIOw16o16i,
1322 gOIw16i16o = dnnl_gOIw16i16o,
1323 gOIw16o16i = dnnl_gOIw16o16i,
1324 gOiw16o = dnnl_gOiw16o,
1325 gOIw4i16o4i = dnnl_gOIw4i16o4i,
1326 gOIw4i4o = dnnl_gOIw4i4o,
1327 gOiw4o = dnnl_gOiw4o,
1328 gOIw8i16o2i = dnnl_gOIw8i16o2i,
1329 gOIw8i8o = dnnl_gOIw8i8o,
1330 gOIw8o16i2o = dnnl_gOIw8o16i2o,
1331 gOIw8o8i = dnnl_gOIw8o8i,
1332 gOwi16o = dnnl_gOwi16o,
1333 gOwi4o = dnnl_gOwi4o,
1334 gOwi8o = dnnl_gOwi8o,
1335 gIOhw16o16i = dnnl_gIOhw16o16i,
1336 gOhwi16o = dnnl_gOhwi16o,
1337 gOhwi4o = dnnl_gOhwi4o,
1338 gOhwi8o = dnnl_gOhwi8o,
1339 Goihw16g = dnnl_Goihw16g,
1340 gOIhw16i16o = dnnl_gOIhw16i16o,
1341 gOIhw16o16i = dnnl_gOIhw16o16i,
1342 gOihw16o = dnnl_gOihw16o,
1343 gOIhw2i8o4i = dnnl_gOIhw2i8o4i,
1344 gOIhw4i16o4i = dnnl_gOIhw4i16o4i,
1345 gOIhw4i4o = dnnl_gOIhw4i4o,
1346 gOIhw4o4i = dnnl_gOIhw4o4i,
1347 gOihw4o = dnnl_gOihw4o,
1348 Goihw8g = dnnl_Goihw8g,
1349 gOIhw8i16o2i = dnnl_gOIhw8i16o2i,
1350 gOIhw8i8o = dnnl_gOIhw8i8o,
1351 gOIhw8o16i2o = dnnl_gOIhw8o16i2o,
1352 OIhw4o8i8o4i = dnnl_OIhw4o8i8o4i,
1353 OIhw2o8i8o2i = dnnl_OIhw2o8i8o2i,
1354 gOIhw4o8i8o4i = dnnl_gOIhw4o8i8o4i,
1355 gOIhw2o8i8o2i = dnnl_gOIhw2o8i8o2i,
1356 gOIhw8o8i = dnnl_gOIhw8o8i,
1357 gIOdhw16i16o = dnnl_gIOdhw16i16o,
1358 gOdhwi16o = dnnl_gOdhwi16o,
1359 gOdhwi4o = dnnl_gOdhwi4o,
1360 gOdhwi8o = dnnl_gOdhwi8o,
1361 gOIdhw16i16o = dnnl_gOIdhw16i16o,
1362 gOIdhw16o16i = dnnl_gOIdhw16o16i,
1363 gOidhw16o = dnnl_gOidhw16o,
1364 gOIdhw4i4o = dnnl_gOIdhw4i4o,
1365 gOidhw4o = dnnl_gOidhw4o,
1366 gOIdhw8i16o2i = dnnl_gOIdhw8i16o2i,
1367 gOIdhw8i8o = dnnl_gOIdhw8i8o,
1368 gOIdhw8o8i = dnnl_gOIdhw8o8i,
1386 validate_dims(adims);
1389 adims.size() == 0 ? nullptr : &adims[0],
1390 convert_to_c(adata_type),
1391 convert_to_c(aformat_tag)),
1392 "could not initialize a memory descriptor by tag");
1401 validate_dims(adims);
1404 adims.size() == 0 ? nullptr : &adims[0],
1405 convert_to_c(adata_type),
1406 astrides.size() == 0 ? nullptr : &astrides[0]),
1407 "could not initialize a memory descriptor by strides");
1422 &sub_md, &
data, &adims[0], &offsets[0]),
1423 "could not initialize a sub-memory");
1424 return desc(sub_md);
1431 (
int)adims.size(), &adims[0]),
1432 "could not reshape a memory descriptor");
1433 return desc(out_md);
1443 bool operator==(
const desc &other)
const {
1447 bool operator!=(
const desc &other)
const {
return !operator==(other); }
1461 "could not create a memory");
1470 :
memory(md, aengine, DNNL_MEMORY_ALLOCATE) {}
1476 "could not get memory descriptor from a memory");
1477 return desc(*cdesc);
1484 "could not get engine from a memory");
1494 "could not get native handle");
1498 void set_data_handle(
void *
handle)
const {
1500 "could not set native handle");
1518 template <
typename T =
void>
1522 "could not map the data");
1523 return static_cast<T *
>(mapped_ptr);
1536 "could not unmap the data");
1539 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL 1544 "could not get OpenCL memory object");
1551 "could not set OpenCL memory object");
1565 return a == memory::convert_to_c(b);
1578 return a == memory::convert_to_c(b);
1612 "could not query implementation info string");
1620 get(), dnnl::convert_to_c(q), 0, &res);
1629 if (!std::any_of(valid_q.cbegin(), valid_q.cend(),
1630 [=](
query q) {
return what == q; }))
1634 get(), dnnl::convert_to_c(what), idx);
1652 "could not get scratchpad engine from a primitive_desc");
1661 "could not get attributes");
1664 "could not clone attributes");
1673 "could not clone primitive descriptor");
1677 primitive_desc_base(
1695 if (pd ==
nullptr)
return;
1708 "could not get primitive kind from the primitive descriptor");
1709 if (pd_kind != c_prim_kind)
1711 "primitive descriptor operation kind mismatch");
1721 "could not get propagation kind " 1722 "from the primitive descriptor");
1727 && (pd_prop_kind == c_prop_kind1
1728 || pd_prop_kind == c_prop_kind2))) {
1729 reset_with_clone(pd);
1735 "primitive descriptor propagation kind mismatch");
1754 using primitive_desc_base::primitive_desc_base;
1756 primitive_desc() =
default;
1766 "could not create a reorder primitive descriptor");
1779 "could not create a reorder primitive descriptor");
1788 engine get_src_engine()
const {
1792 engine get_dst_engine()
const {
1802 :
primitive(primitive_desc(src, dst).
get()) {}
1804 using primitive::execute;
1807 primitive::execute(astream, {{DNNL_ARG_FROM, src}, {DNNL_ARG_TO, dst}});
1821 inline std::vector<dnnl_memory_desc_t> convert_to_c(
1822 const std::vector<memory::desc> &mems) {
1823 std::vector<dnnl_memory_desc_t> c_api_mems;
1824 c_api_mems.reserve(mems.size());
1825 for (
const auto &s : mems)
1826 c_api_mems.push_back(s.data);
1840 using primitive_desc_base::primitive_desc_base;
1842 primitive_desc(
const memory::desc &dst,
int concat_dimension,
1843 const std::vector<memory::desc> &srcs,
const engine &aengine,
1845 auto c_api_srcs = convert_to_c(srcs);
1850 (
int)c_api_srcs.size(), concat_dimension,
1851 &c_api_srcs[0], aattr.get(), aengine.
get()),
1852 "could not create a concat primitive descriptor");
1856 primitive_desc(
int concat_dimension,
1857 const std::vector<memory::desc> &srcs,
const engine &aengine,
1859 auto c_api_srcs = convert_to_c(srcs);
1864 (
int)c_api_srcs.size(), concat_dimension,
1865 &c_api_srcs[0], aattr.get(), aengine.
get()),
1866 "could not create a concat primitive descriptor");
1900 using primitive_desc_base::primitive_desc_base;
1902 primitive_desc() =
default;
1905 const std::vector<float> &scales,
1906 const std::vector<memory::desc> &srcs,
const engine &aengine,
1911 "number of scales not equal to number of srcs");
1913 auto c_api_srcs = convert_to_c(srcs);
1918 (
int)c_api_srcs.size(), &scales[0], &c_api_srcs[0],
1919 aattr.get(), aengine.
get()),
1920 "could not create a sum primitive descriptor");
1924 primitive_desc(
const std::vector<float> &scales,
1925 const std::vector<memory::desc> &srcs,
const engine &aengine,
1930 "number of scales not equal to number of srcs");
1932 auto c_api_srcs = convert_to_c(srcs);
1936 (
int)c_api_srcs.size(), &scales[0], &c_api_srcs[0],
1937 aattr.get(), aengine.
get()),
1938 "could not create a sum primitive descriptor");
1969 using primitive_desc_base::primitive_desc_base;
1980 bool allow_empty =
false)
1981 : allow_empty(allow_empty) {
1984 desc, attr ? attr->
get() :
nullptr, e.
get(), hint_fwd_pd);
1987 status,
"could not create a primitive descriptor iterator");
1988 pd_iterator.reset(iterator);
2009 bool allow_empty =
false;
2013 pd_iterator.
get(allow_empty));
2016 "could not fetch a primitive descriptor from the iterator");
2052 const memory::dims &strides,
const memory::dims &padding_l,
2053 const memory::dims &padding_r) {
2054 memory::validate_dims(strides);
2055 memory::validate_dims(padding_l);
2056 memory::validate_dims(padding_r);
2059 dnnl::convert_to_c(aprop_kind),
2060 convert_to_c(aalgorithm), &src_desc.
data,
2062 &strides[0], &padding_l[0], &padding_r[0]),
2063 "could not create a convolution forward descriptor");
2076 const memory::desc &dst_desc,
const memory::dims &strides,
2077 const memory::dims &padding_l,
const memory::dims &padding_r) {
2078 memory::validate_dims(strides);
2079 memory::validate_dims(padding_l);
2080 memory::validate_dims(padding_r);
2083 dnnl::convert_to_c(aprop_kind),
2084 convert_to_c(aalgorithm), &src_desc.
data,
2085 &weights_desc.
data,
nullptr, &dst_desc.
data,
2086 &strides[0], &padding_l[0], &padding_r[0]),
2087 "could not create a convolution forward descriptor");
2101 const memory::dims &strides,
const memory::dims &dilates,
2102 const memory::dims &padding_l,
const memory::dims &padding_r) {
2103 memory::validate_dims(strides);
2104 memory::validate_dims(dilates);
2105 memory::validate_dims(padding_l);
2106 memory::validate_dims(padding_r);
2108 dnnl::convert_to_c(aprop_kind),
2109 convert_to_c(aalgorithm), &src_desc.
data,
2110 &weights_desc.
data, &bias_desc.
data,
2111 &dst_desc.
data, &strides[0], &dilates[0],
2112 &padding_l[0], &padding_r[0]),
2113 "could not create a dilated convolution forward " 2127 const memory::desc &dst_desc,
const memory::dims &strides,
2128 const memory::dims &dilates,
const memory::dims &padding_l,
2129 const memory::dims &padding_r) {
2130 memory::validate_dims(strides);
2131 memory::validate_dims(dilates);
2132 memory::validate_dims(padding_l);
2133 memory::validate_dims(padding_r);
2135 dnnl::convert_to_c(aprop_kind),
2136 convert_to_c(aalgorithm), &src_desc.
data,
2137 &weights_desc.
data,
nullptr,
2138 &dst_desc.
data, &strides[0], &dilates[0],
2139 &padding_l[0], &padding_r[0]),
2140 "could not create a dilated convolution forward " 2154 &
desc.data, nullptr, e, nullptr, allow_empty) {}
2159 const engine &e,
bool allow_empty =
false)
2215 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2216 const memory::dims &padding_l,
const memory::dims &padding_r) {
2217 memory::validate_dims(strides);
2218 memory::validate_dims(padding_l);
2219 memory::validate_dims(padding_r);
2222 convert_to_c(aalgorithm), &diff_src_desc.
data,
2223 &weights_desc.
data, &diff_dst_desc.
data,
2224 &strides[0], &padding_l[0], &padding_r[0]),
2225 "could not create a convolution backward data descriptor");
2236 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2237 const memory::dims &dilates,
const memory::dims &padding_l,
2238 const memory::dims &padding_r) {
2239 memory::validate_dims(strides);
2240 memory::validate_dims(dilates);
2241 memory::validate_dims(padding_l);
2242 memory::validate_dims(padding_r);
2245 convert_to_c(aalgorithm), &diff_src_desc.
data,
2246 &weights_desc.
data, &diff_dst_desc.
data,
2247 &strides[0], &dilates[0], &padding_l[0],
2249 "could not create a convolution backward data descriptor");
2261 bool allow_empty =
false)
2263 &
desc.data, nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
2270 bool allow_empty =
false)
2272 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
2322 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2323 const memory::dims &padding_l,
const memory::dims &padding_r) {
2324 memory::validate_dims(strides);
2325 memory::validate_dims(padding_l);
2326 memory::validate_dims(padding_r);
2329 convert_to_c(aalgorithm), &src_desc.
data,
2330 &diff_weights_desc.
data, &diff_bias_desc.
data,
2331 &diff_dst_desc.
data, &strides[0], &padding_l[0],
2333 "could not create a convolution backward weights " 2345 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2346 const memory::dims &padding_l,
const memory::dims &padding_r) {
2347 memory::validate_dims(strides);
2348 memory::validate_dims(padding_l);
2349 memory::validate_dims(padding_r);
2351 convert_to_c(aalgorithm), &src_desc.
data,
2352 &diff_weights_desc.
data,
nullptr,
2353 &diff_dst_desc.
data, &strides[0],
2354 &padding_l[0], &padding_r[0]),
2355 "could not create a convolution backward weights " 2368 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2369 const memory::dims &dilates,
const memory::dims &padding_l,
2370 const memory::dims &padding_r) {
2371 memory::validate_dims(strides);
2372 memory::validate_dims(dilates);
2373 memory::validate_dims(padding_l);
2374 memory::validate_dims(padding_r);
2377 convert_to_c(aalgorithm), &src_desc.
data,
2378 &diff_weights_desc.
data, &diff_bias_desc.
data,
2379 &diff_dst_desc.
data, &strides[0], &dilates[0],
2380 &padding_l[0], &padding_r[0]),
2381 "could not create a convolution backward weights " 2393 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2394 const memory::dims &dilates,
const memory::dims &padding_l,
2395 const memory::dims &padding_r) {
2396 memory::validate_dims(strides);
2397 memory::validate_dims(dilates);
2398 memory::validate_dims(padding_l);
2399 memory::validate_dims(padding_r);
2402 convert_to_c(aalgorithm), &src_desc.
data,
2403 &diff_weights_desc.
data,
nullptr,
2404 &diff_dst_desc.
data, &strides[0], &dilates[0],
2405 &padding_l[0], &padding_r[0]),
2406 "could not create a convolution backward weights " 2418 bool allow_empty =
false)
2420 &
desc.data, nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
2427 bool allow_empty =
false)
2429 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
2492 const memory::dims &strides,
const memory::dims &padding_l,
2493 const memory::dims &padding_r) {
2494 memory::validate_dims(strides);
2495 memory::validate_dims(padding_l);
2496 memory::validate_dims(padding_r);
2499 dnnl::convert_to_c(aprop_kind),
2500 convert_to_c(aalgorithm), &src_desc.
data,
2502 &strides[0], &padding_l[0], &padding_r[0]),
2503 "could not create a deconvolution forward descriptor");
2516 const memory::desc &dst_desc,
const memory::dims &strides,
2517 const memory::dims &padding_l,
const memory::dims &padding_r) {
2518 memory::validate_dims(strides);
2519 memory::validate_dims(padding_l);
2520 memory::validate_dims(padding_r);
2523 dnnl::convert_to_c(aprop_kind),
2524 convert_to_c(aalgorithm), &src_desc.
data,
2525 &weights_desc.
data,
nullptr, &dst_desc.
data,
2526 &strides[0], &padding_l[0], &padding_r[0]),
2527 "could not create a deconvolution forward descriptor");
2541 const memory::dims &strides,
const memory::dims &dilates,
2542 const memory::dims &padding_l,
const memory::dims &padding_r) {
2543 memory::validate_dims(strides);
2544 memory::validate_dims(dilates);
2545 memory::validate_dims(padding_l);
2546 memory::validate_dims(padding_r);
2548 &data, dnnl::convert_to_c(aprop_kind),
2549 convert_to_c(aalgorithm), &src_desc.
data,
2550 &weights_desc.
data, &bias_desc.
data,
2551 &dst_desc.
data, &strides[0], &dilates[0],
2552 &padding_l[0], &padding_r[0]),
2553 "could not create a dilated deconvolution forward " 2567 const memory::desc &dst_desc,
const memory::dims &strides,
2568 const memory::dims &dilates,
const memory::dims &padding_l,
2569 const memory::dims &padding_r) {
2570 memory::validate_dims(strides);
2571 memory::validate_dims(dilates);
2572 memory::validate_dims(padding_l);
2573 memory::validate_dims(padding_r);
2575 &data, dnnl::convert_to_c(aprop_kind),
2576 convert_to_c(aalgorithm), &src_desc.
data,
2577 &weights_desc.
data,
nullptr,
2578 &dst_desc.
data, &strides[0], &dilates[0],
2579 &padding_l[0], &padding_r[0]),
2580 "could not create a dilated deconvolution forward " 2594 &
desc.data, nullptr, e, nullptr, allow_empty) {}
2599 const engine &e,
bool allow_empty =
false)
2655 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2656 const memory::dims &padding_l,
const memory::dims &padding_r) {
2657 memory::validate_dims(strides);
2658 memory::validate_dims(padding_l);
2659 memory::validate_dims(padding_r);
2662 convert_to_c(aalgorithm), &diff_src_desc.
data,
2663 &weights_desc.
data, &diff_dst_desc.
data,
2664 &strides[0], &padding_l[0], &padding_r[0]),
2665 "could not create a deconvolution backward data " 2677 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2678 const memory::dims &dilates,
const memory::dims &padding_l,
2679 const memory::dims &padding_r) {
2680 memory::validate_dims(strides);
2681 memory::validate_dims(dilates);
2682 memory::validate_dims(padding_l);
2683 memory::validate_dims(padding_r);
2686 convert_to_c(aalgorithm), &diff_src_desc.
data,
2687 &weights_desc.
data, &diff_dst_desc.
data,
2688 &strides[0], &dilates[0], &padding_l[0],
2690 "could not create a dilated deconvolution backward data " 2703 bool allow_empty =
false)
2705 &
desc.data, nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
2712 bool allow_empty =
false)
2714 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
2764 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2765 const memory::dims &padding_l,
const memory::dims &padding_r) {
2766 memory::validate_dims(strides);
2767 memory::validate_dims(padding_l);
2768 memory::validate_dims(padding_r);
2771 convert_to_c(aalgorithm), &src_desc.
data,
2772 &diff_weights_desc.
data, &diff_bias_desc.
data,
2773 &diff_dst_desc.
data, &strides[0], &padding_l[0],
2775 "could not create a deconvolution backward weights " 2787 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2788 const memory::dims &padding_l,
const memory::dims &padding_r) {
2789 memory::validate_dims(strides);
2790 memory::validate_dims(padding_l);
2791 memory::validate_dims(padding_r);
2793 &data, convert_to_c(aalgorithm),
2794 &src_desc.
data, &diff_weights_desc.
data,
2795 nullptr, &diff_dst_desc.
data, &strides[0],
2796 &padding_l[0], &padding_r[0]),
2797 "could not create a deconvolution backward weights " 2810 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2811 const memory::dims &dilates,
const memory::dims &padding_l,
2812 const memory::dims &padding_r) {
2813 memory::validate_dims(strides);
2814 memory::validate_dims(dilates);
2815 memory::validate_dims(padding_l);
2816 memory::validate_dims(padding_r);
2819 convert_to_c(aalgorithm), &src_desc.
data,
2820 &diff_weights_desc.
data, &diff_bias_desc.
data,
2821 &diff_dst_desc.
data, &strides[0], &dilates[0],
2822 &padding_l[0], &padding_r[0]),
2823 "could not create a dilated deconvolution backward " 2824 "weights descriptor");
2835 const memory::desc &diff_dst_desc,
const memory::dims &strides,
2836 const memory::dims &dilates,
const memory::dims &padding_l,
2837 const memory::dims &padding_r) {
2838 memory::validate_dims(strides);
2839 memory::validate_dims(dilates);
2840 memory::validate_dims(padding_l);
2841 memory::validate_dims(padding_r);
2844 convert_to_c(aalgorithm), &src_desc.
data,
2845 &diff_weights_desc.
data,
nullptr,
2846 &diff_dst_desc.
data, &strides[0], &dilates[0],
2847 &padding_l[0], &padding_r[0]),
2848 "could not create a dilated deconvolution backward weights " 2860 bool allow_empty =
false)
2862 &
desc.data, nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
2869 bool allow_empty =
false)
2871 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
2930 float alpha,
float beta,
float k = 1.f) {
2932 dnnl::convert_to_c(aprop_kind),
2933 convert_to_c(aalgorithm), &src_desc.
data,
2934 local_size, alpha, beta, k),
2935 "could not create a lrn forward descriptor");
2947 &
desc.data,
nullptr, e,
nullptr, allow_empty) {}
2950 const engine &e,
bool allow_empty =
false)
2994 const memory::desc &diff_data_desc, memory::dim local_size,
2995 float alpha,
float beta,
float k = 1.f) {
2998 &diff_data_desc.
data, &data_desc.
data, local_size,
3000 "could not create a lrn backward descriptor");
3011 bool allow_empty =
false)
3013 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
3017 bool allow_empty =
false)
3019 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
3075 const memory::dims &strides,
const memory::dims &kernel,
3076 const memory::dims &padding_l,
const memory::dims &padding_r) {
3077 memory::validate_dims(strides);
3078 memory::validate_dims(kernel);
3079 memory::validate_dims(padding_l);
3080 memory::validate_dims(padding_r);
3082 dnnl::convert_to_c(aprop_kind),
3083 convert_to_c(aalgorithm), &src_desc.
data,
3084 &dst_desc.
data, &strides[0], &kernel[0],
3085 &padding_l[0], &padding_r[0]),
3086 "could not init a forward pooling descriptor");
3097 &
desc.data,
nullptr, e,
nullptr, allow_empty) {}
3100 const engine &e,
bool allow_empty =
false)
3130 struct pooling_backward :
public primitive {
3140 const memory::desc &diff_dst_desc,
const memory::dims &strides,
3141 const memory::dims &kernel,
const memory::dims &padding_l,
3142 const memory::dims &padding_r) {
3143 memory::validate_dims(strides);
3144 memory::validate_dims(kernel);
3145 memory::validate_dims(padding_l);
3146 memory::validate_dims(padding_r);
3149 convert_to_c(aalgorithm), &diff_src_desc.
data,
3150 &diff_dst_desc.
data, &strides[0], &kernel[0],
3151 &padding_l[0], &padding_r[0]),
3152 "could not init a backward pooling descriptor");
3162 bool allow_empty =
false)
3164 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
3169 bool allow_empty =
false)
3171 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
3197 pooling_backward() =
default;
3233 const memory::desc &src_desc,
float alpha = 0,
float beta = 0) {
3235 dnnl::convert_to_c(aprop_kind),
3236 dnnl::convert_to_c(aalgorithm),
3237 &src_desc.
data, alpha, beta),
3238 "could not create a eltwise forward descriptor");
3249 &
desc.data,
nullptr, e,
nullptr, allow_empty) {}
3252 const engine &e,
bool allow_empty =
false)
3290 dnnl::convert_to_c(aalgorithm),
3291 &diff_data_desc.
data, &data_desc.
data, alpha, beta),
3292 "could not create a eltwise backward descriptor");
3302 bool allow_empty =
false)
3304 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
3309 bool allow_empty =
false)
3311 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
3361 dnnl::convert_to_c(aprop_kind),
3362 &data_desc.
data, softmax_axis),
3363 "could not create a softmax forward descriptor");
3374 &
desc.data,
nullptr, e,
nullptr, allow_empty) {}
3377 const engine &e,
bool allow_empty =
false)
3414 &data_desc.
data, softmax_axis),
3415 "could not init a backward softmax descriptor");
3425 bool allow_empty =
false)
3427 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
3432 bool allow_empty =
false)
3434 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
3501 dnnl::convert_to_c(aprop_kind), &src_desc.
data,
3502 epsilon, convert_to_c(flags)),
3503 "could not create a batch normalization forward " 3515 &
desc.data,
nullptr, e,
nullptr, allow_empty) {}
3518 const engine &e,
bool allow_empty =
false)
3565 "could not get a batch-normalization descriptor");
3572 batch_normalization_forward() =
default;
3574 batch_normalization_forward(
const primitive_desc &pd) : primitive(pd) {}
3597 dnnl::convert_to_c(aprop_kind),
3598 &diff_data_desc.
data, &data_desc.
data,
3599 epsilon, convert_to_c(flags)),
3600 "could not create a batch normalization backward " 3611 bool allow_empty =
false)
3613 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
3618 bool allow_empty =
false)
3620 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
3719 dnnl::convert_to_c(aprop_kind), &src_desc.
data,
3720 &stat_desc.
data, epsilon, convert_to_c(flags)),
3721 "could not create a layer normalization forward " 3729 dnnl::convert_to_c(aprop_kind), &src_desc.
data,
3730 nullptr, epsilon, convert_to_c(flags)),
3731 "could not create a layer normalization forward " 3743 &
desc.data,
nullptr, e,
nullptr, allow_empty) {}
3746 const engine &e,
bool allow_empty =
false)
3793 "could not get a layer-normalization descriptor");
3800 layer_normalization_forward() =
default;
3802 layer_normalization_forward(
const primitive_desc &pd) : primitive(pd) {}
3826 dnnl::convert_to_c(aprop_kind),
3827 &diff_data_desc.
data, &data_desc.
data,
3828 &stat_desc.
data, epsilon, convert_to_c(flags)),
3829 "could not create a layer normalization backward " 3837 dnnl::convert_to_c(aprop_kind),
3838 &diff_data_desc.
data, &data_desc.
data,
3839 nullptr, epsilon, convert_to_c(flags)),
3840 "could not create a layer normalization backward " 3851 bool allow_empty =
false)
3853 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
3858 bool allow_empty =
false)
3860 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
3945 dnnl::convert_to_c(aprop_kind),
3946 &src_desc.
data, &weights_desc.
data,
3948 "could not create a inner product forward descriptor");
3956 dnnl::convert_to_c(aprop_kind), &src_desc.
data,
3957 &weights_desc.
data,
nullptr, &dst_desc.
data),
3958 "could not create a inner product forward descriptor");
3969 &
desc.data,
nullptr, e,
nullptr, allow_empty) {}
3972 const engine &e,
bool allow_empty =
false)
4023 &diff_src_desc.
data, &weights_desc.
data,
4024 &diff_dst_desc.
data),
4025 "could not create a inner product backward data " 4037 bool allow_empty =
false)
4039 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
4044 bool allow_empty =
false)
4046 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
4092 &src_desc.
data, &diff_weights_desc.
data,
4093 &diff_bias_desc.
data, &diff_dst_desc.
data),
4094 "could not create a inner product backward weights " 4102 &src_desc.
data, &diff_weights_desc.
data,
nullptr,
4103 &diff_dst_desc.
data),
4104 "could not create a inner product backward weights " 4116 bool allow_empty =
false)
4118 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
4123 bool allow_empty =
false)
4125 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
4166 struct rnn_primitive_desc_base :
public primitive_desc {
4167 using primitive_desc::primitive_desc;
4169 rnn_primitive_desc_base() =
default;
4181 rc,
"could not retrieve rnn_desc from a primitive descriptor");
4188 && (
rnn_d->prop_kind == c_prop_kind1
4189 ||
rnn_d->prop_kind == c_prop_kind2)
4190 &&
rnn_d->cell_kind == c_cell_kind;
4194 reset_with_clone(pd);
4232 rnn_direction direction,
const memory::desc &src_layer_desc,
4239 rnn_flags flags = rnn_flags::undef,
float alpha = 0.0f,
4240 float beta = 0.0f) {
4243 dnnl::convert_to_c(aprop_kind),
4244 dnnl::convert_to_c(activation),
4245 dnnl::convert_to_c(direction), &src_layer_desc.
data,
4246 &src_iter_desc.
data, &weights_layer_desc.
data,
4247 &weights_iter_desc.
data, &bias_desc.
data,
4248 &dst_layer_desc.
data, &dst_iter_desc.
data,
4249 dnnl::convert_to_c(flags), alpha, beta),
4250 "could not create an RNN forward descriptor");
4260 : rnn_primitive_desc_base(
4261 &
desc.data,
nullptr, e,
nullptr, allow_empty) {}
4264 const engine &e,
bool allow_empty =
false)
4265 : rnn_primitive_desc_base(
4266 &
desc.data, &attr, e,
nullptr, allow_empty) {}
4359 rnn_direction direction,
const memory::desc &src_layer_desc,
4373 rnn_flags flags = rnn_flags::undef,
float alpha = 0.0f,
4374 float beta = 0.0f) {
4377 dnnl::convert_to_c(aprop_kind),
4378 dnnl::convert_to_c(activation),
4379 dnnl::convert_to_c(direction), &src_layer_desc.
data,
4380 &src_iter_desc.
data, &weights_layer_desc.
data,
4381 &weights_iter_desc.
data, &bias_desc.
data,
4382 &dst_layer_desc.
data, &dst_iter_desc.
data,
4383 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
4384 &diff_weights_layer_desc.
data,
4385 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
4386 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
4387 dnnl::convert_to_c(flags), alpha, beta),
4388 "could not create an RNN backward descriptor");
4398 bool allow_empty =
false)
4399 : rnn_primitive_desc_base(
4400 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
4405 bool allow_empty =
false)
4406 : rnn_primitive_desc_base(
4407 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
4549 rnn_flags flags = rnn_flags::undef) {
4552 dnnl::convert_to_c(aprop_kind),
4553 dnnl::convert_to_c(direction), &src_layer_desc.
data,
4554 &src_iter_desc.
data, &src_iter_c_desc.
data,
4555 &weights_layer_desc.
data, &weights_iter_desc.
data,
4556 &bias_desc.
data, &dst_layer_desc.
data,
4557 &dst_iter_desc.
data, &dst_iter_c_desc.
data,
4558 dnnl::convert_to_c(flags)),
4559 "could not create an LSTM forward descriptor");
4569 : rnn_primitive_desc_base(
4570 &
desc.data,
nullptr, e,
nullptr, allow_empty) {}
4573 const engine &e,
bool allow_empty =
false)
4574 : rnn_primitive_desc_base(
4575 &
desc.data, &attr, e,
nullptr, allow_empty) {}
4697 rnn_flags flags = rnn_flags::undef) {
4700 dnnl::convert_to_c(aprop_kind),
4701 dnnl::convert_to_c(direction), &src_layer_desc.
data,
4702 &src_iter_desc.
data, &src_iter_c_desc.
data,
4703 &weights_layer_desc.
data, &weights_iter_desc.
data,
4704 &bias_desc.
data, &dst_layer_desc.
data,
4705 &dst_iter_desc.
data, &dst_iter_c_desc.
data,
4706 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
4707 &diff_src_iter_c_desc.
data,
4708 &diff_weights_layer_desc.
data,
4709 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
4710 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
4711 &diff_dst_iter_c_desc.
data,
4712 dnnl::convert_to_c(flags)),
4713 "could not create an LSTM backward descriptor");
4723 bool allow_empty =
false)
4724 : rnn_primitive_desc_base(
4725 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
4730 bool allow_empty =
false)
4731 : rnn_primitive_desc_base(
4732 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
4893 rnn_flags flags = rnn_flags::undef) {
4896 dnnl::convert_to_c(aprop_kind),
4897 dnnl::convert_to_c(direction), &src_layer_desc.
data,
4898 &src_iter_desc.
data, &weights_layer_desc.
data,
4899 &weights_iter_desc.
data, &bias_desc.
data,
4900 &dst_layer_desc.
data, &dst_iter_desc.
data,
4901 dnnl::convert_to_c(flags)),
4902 "could not create a GRU forward descriptor");
4912 : rnn_primitive_desc_base(
4913 &
desc.data,
nullptr, e,
nullptr, allow_empty) {}
4916 const engine &e,
bool allow_empty =
false)
4917 : rnn_primitive_desc_base(
4918 &
desc.data, &attr, e,
nullptr, allow_empty) {}
5023 rnn_flags flags = rnn_flags::undef) {
5026 dnnl::convert_to_c(aprop_kind),
5027 dnnl::convert_to_c(direction), &src_layer_desc.
data,
5028 &src_iter_desc.
data, &weights_layer_desc.
data,
5029 &weights_iter_desc.
data, &bias_desc.
data,
5030 &dst_layer_desc.
data, &dst_iter_desc.
data,
5031 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
5032 &diff_weights_layer_desc.
data,
5033 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
5034 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
5035 dnnl::convert_to_c(flags)),
5036 "could not create an GRU backward descriptor");
5046 bool allow_empty =
false)
5047 : rnn_primitive_desc_base(
5048 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
5052 bool allow_empty =
false)
5053 : rnn_primitive_desc_base(
5054 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
5195 rnn_flags flags = rnn_flags::undef) {
5198 dnnl::convert_to_c(aprop_kind),
5199 dnnl::convert_to_c(direction), &src_layer_desc.
data,
5200 &src_iter_desc.
data, &weights_layer_desc.
data,
5201 &weights_iter_desc.
data, &bias_desc.
data,
5202 &dst_layer_desc.
data, &dst_iter_desc.
data,
5203 dnnl::convert_to_c(flags)),
5204 "could not create a Linear-before-reset GRU forward " 5215 : rnn_primitive_desc_base(
5216 &
desc.data,
nullptr, e,
nullptr, allow_empty) {}
5219 const engine &e,
bool allow_empty =
false)
5220 : rnn_primitive_desc_base(
5221 &
desc.data, &attr, e,
nullptr, allow_empty) {}
5326 rnn_flags flags = rnn_flags::undef) {
5329 dnnl::convert_to_c(aprop_kind),
5330 dnnl::convert_to_c(direction), &src_layer_desc.
data,
5331 &src_iter_desc.
data, &weights_layer_desc.
data,
5332 &weights_iter_desc.
data, &bias_desc.
data,
5333 &dst_layer_desc.
data, &dst_iter_desc.
data,
5334 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
5335 &diff_weights_layer_desc.
data,
5336 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
5337 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
5338 dnnl::convert_to_c(flags)),
5339 "could not create an LBR_GRU backward descriptor");
5349 bool allow_empty =
false)
5350 : rnn_primitive_desc_base(
5351 &
desc.data,
nullptr, e, hint_fwd_pd.
get(), allow_empty) {}
5356 bool allow_empty =
false)
5357 : rnn_primitive_desc_base(
5358 &
desc.data, &attr, e, hint_fwd_pd.
get(), allow_empty) {}
5363 : rnn_primitive_desc_base(
5487 dnnl::convert_to_c(aprop_kind),
5488 &data_desc.
data, axis, group_size),
5489 "could not create a shuffle forward descriptor");
5499 bool allow_empty =
false)
5501 &
desc.data, &aattr, e,
nullptr, allow_empty) {}
5532 desc(
const memory::desc &diff_data_desc,
int axis,
int group_size) {
5534 &diff_data_desc.
data, axis, group_size),
5535 "could not create a shuffle backward descriptor");
5541 primitive_desc() =
default;
5543 primitive_desc(
const desc &desc,
const engine &e,
5546 bool allow_empty =
false)
5548 &desc.data, &aattr, e, hint_fwd_pd.
get(), allow_empty) {}
5596 "could not create a binary descriptor");
5605 const desc &desc,
const engine &e,
bool allow_empty =
false)
5607 &desc.data, nullptr, e, nullptr, allow_empty) {}
5612 const desc &desc,
const primitive_attr &attr,
const engine &e)
5613 :
dnnl::primitive_desc(&desc.data, &attr, e, nullptr) {}
5632 binary(
const primitive_desc &pd) : primitive(pd) {}
5647 "could not create a primitive");
5651 inline primitive::primitive(
const primitive_desc &pd) : primitive(pd.get()) {}
5653 inline void primitive::execute(
5654 stream &astream,
const std::unordered_map<int, memory> &args)
const {
5655 std::vector<dnnl_exec_arg_t> c_args;
5656 c_args.reserve(args.size());
5657 for (
const auto &a : args)
5658 c_args.push_back({a.first, a.second.get()});
5661 (int)c_args.size(), c_args.data()),
5662 "could not execute a primitive");
layer normalization for forward propagation.
Definition: dnnl.hpp:3700
cl_device_id get_ocl_device() const
Returns the OpenCL device associated with the engine.
Definition: dnnl.hpp:902
deconvolution_forward(const primitive_desc &pd)
Creates a deconvolution forward propagation primitive from the corresponding primitive descriptor...
Definition: dnnl.hpp:2634
4D CNN activations tensor blocked by channels with block size 8, an alias to dnnl_aBcd8b ...
Definition: dnnl_types.h:454
1D tensor, an alias to dnnl_a
Definition: dnnl_types.h:338
void * get_data_handle() const
Returns a handle of the data contained in the memory.
Definition: dnnl.hpp:1491
flags
Stream flags.
Definition: dnnl.hpp:951
memory::desc diff_weights_desc() const
Queries diff weights memory descriptor.
Definition: dnnl.hpp:2883
Primitive descriptor for shuffle forward propagation.
Definition: dnnl.hpp:5494
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: dnnl.hpp:2125
memory(const desc &md, const engine &aengine, void *ahandle)
Constructs a memory.
Definition: dnnl.hpp:1457
desc reshape(const dims &adims)
Constructs a memory descriptor by reshaping existing one.
Definition: dnnl.hpp:1428
2D RNN statistics tensor, an alias to dnnl_ba
Definition: dnnl_types.h:346
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: dnnl.hpp:4307
dnnl_status_t DNNL_API dnnl_softmax_forward_desc_init(dnnl_softmax_desc_t *softmax_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, int softmax_axis)
Initializes a softmax_desc for forward propagation using prop_kind (possible values are dnnl_forward_...
memory::desc src_iter_c_desc() const
Queries source recurrent cell state memory descriptor.
Definition: dnnl.hpp:4754
dnnl_data_type_t
Data type specification.
Definition: dnnl_types.h:68
memory::desc diff_src_desc() const
Queries diff source memory descriptor.
Definition: dnnl.hpp:3446
32-bit signed integer.
Definition: dnnl_types.h:78
Deconvolution forward propagation.
Definition: dnnl.hpp:2475
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: dnnl.hpp:5249
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:2963
dnnl_status_t DNNL_API dnnl_primitive_attr_destroy(dnnl_primitive_attr_t attr)
Deletes an attr.
memory::desc diff_dst_iter_desc() const
Queries diff destination recurrent hidden state memory descriptor.
Definition: dnnl.hpp:4843
Primitive descriptor for pooling forward propagation.
Definition: dnnl.hpp:3091
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for convolution backward propagation from a C primitive descriptor...
Definition: dnnl.hpp:2276
RNN descriptor for backward propagation.
Definition: dnnl.hpp:4338
Max pooling.
Definition: dnnl_types.h:695
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:5514
3D CNN activations tensor, an alias to dnnl_abc
Definition: dnnl_types.h:348
5D CNN activations tensor blocked by channels with block size 8, an alias to dnnl_aBcde8b ...
Definition: dnnl_types.h:445
A descriptor for an RNN operation.
Definition: dnnl_types.h:1235
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: dnnl.hpp:4764
The operation failed because requested functionality is not implemented.
Definition: dnnl_types.h:58
non-standard 16-bit (bfloat16 w/ 7 bit mantissa) floating point.
Definition: dnnl_types.h:74
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: dnnl.hpp:2993
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 dnnl::...
Definition: dnnl.hpp:3073
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for batch normalization backward propagation from a C primitive de...
Definition: dnnl.hpp:3624
Primitive descriptor for convolution backward propagation.
Definition: dnnl.hpp:2254
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:2966
Primitive descriptor for pooling backward propagation.
Definition: dnnl.hpp:3157
Forward data propagation, alias for dnnl::prop_kind::forward_training.
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: dnnl.hpp:4231
memory::desc dst_iter_desc() const
Queries destination recurrent hidden state memory descriptor.
Definition: dnnl.hpp:4629
2D CNN activations tensor, an alias to dnnl_ab
Definition: dnnl_types.h:340
3D tensor blocked by 2nd dimension with block size 8
Definition: dnnl_types.h:223
5D CNN activations tensor blocked by channels with block size 4, an alias to dnnl_aBcde4b ...
Definition: dnnl_types.h:442
memory::desc diff_weights_desc() const
Queries diff weights (scale and shift) memory descriptor.
Definition: dnnl.hpp:3900
Average pooling exclude padding.
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:4065
plain 1D tensor
Definition: dnnl_types.h:183
A reorder primitive.
Definition: dnnl_types.h:619
dnnl_status_t DNNL_API dnnl_inner_product_backward_weights_desc_init(dnnl_inner_product_desc_t *ip_desc, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *diff_weights_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_desc)
Initializes an inner product descriptor ip_desc for backward propagation with respect to weights usin...
void set_scratchpad_mode(scratchpad_mode mode)
Sets scratchpad mode.
Definition: dnnl.hpp:702
pooling descriptor
Definition: dnnl_types.h:1591
Eltwise: soft_relu.
Definition: dnnl_types.h:682
An opaque structure to describe a primitive.
deconvolution_backward_weights(const primitive_desc &pd)
Creates a deconvolution weight update primitive from the corresponding primitive descriptor.
Definition: dnnl.hpp:2902
Descriptor for convolution forward propagation.
Definition: dnnl.hpp:2038
permuted 5D tensor
Definition: dnnl_types.h:205
An inner product primitive.
Definition: dnnl_types.h:643
memory::desc diff_weights_desc() const
Queries diff weights (scale and shift) memory descriptor.
Definition: dnnl.hpp:3667
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: dnnl.hpp:2653
memory::desc src_iter_desc() const
Queries source recurrent hidden state memory descriptor.
Definition: dnnl.hpp:4749
dnnl_status_t DNNL_API dnnl_layer_normalization_backward_desc_init(dnnl_layer_normalization_desc_t *lnrm_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, const dnnl_memory_desc_t *stat_desc, float epsilon, unsigned flags)
Initializes a layer normalization descriptor lnrm_desc for backward propagation with respect to data ...
memory::desc src_iter_desc() const
Queries source iteration memory descriptor.
Definition: dnnl.hpp:4424
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: dnnl.hpp:2182
void append_eltwise(float scale, algorithm alg, float alpha, float beta)
Appends eltwise post operation.
Definition: dnnl.hpp:648
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: dnnl.hpp:5385
desc(const dims &adims, data_type adata_type, const dims &astrides)
Constructs a memory descriptor by strides.
Definition: dnnl.hpp:1400
permuted 3D tensor
Definition: dnnl_types.h:193
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:3267
memory::desc src_iter_desc() const
Queries source iteration memory descriptor.
Definition: dnnl.hpp:5375
Primitive descriptor for convolution weight update.
Definition: dnnl.hpp:2412
static size_t get_count(kind akind)
Returns the number of engines of a certain kind.
Definition: dnnl.hpp:840
Forward data propagation (training mode).
Definition: dnnl_types.h:594
dnnl_query_t
Primitive descriptor query specification.
Definition: dnnl_types.h:1558
Winograd convolution.
Definition: dnnl_types.h:658
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: dnnl.hpp:5008
Primitive iterator passed over last primitive descriptor.
Definition: dnnl_types.h:60
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:5109
4D CNN weights tensor, an alias to dnnl_abcd
Definition: dnnl_types.h:375
Eltwise: exponent.
Definition: dnnl_types.h:686
5D tensor blocked by 2nd dimension with block size 8
Definition: dnnl_types.h:276
Shuffle for backward propagation.
Definition: dnnl.hpp:5524
Eltwise: abs.
Definition: dnnl_types.h:674
dnnl_status_t DNNL_API dnnl_engine_create_ocl(dnnl_engine_t *engine, dnnl_engine_kind_t kind, cl_device_id device, cl_context context)
Creates an engine of particular kind associated with a given OpenCL device and context objects...
An opaque structure for primitive descriptor attributes.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e, const deconvolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Initializes a primitive descriptor for deconvolution weight update with attributes defined by attr...
Definition: dnnl.hpp:2866
cl_context get_ocl_context() const
Returns the OpenCL context associated with the engine.
Definition: dnnl.hpp:894
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: dnnl.hpp:5270
3D CNN weights tensor, an alias to dnnl_cba
Definition: dnnl_types.h:371
Deconvolution weight update.
Definition: dnnl.hpp:2749
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:4147
memory::desc diff_src_layer_desc() const
Queries diff source layer memory descriptor.
Definition: dnnl.hpp:4802
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:5511
Packed weights format used in RNN.
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: dnnl.hpp:710
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: dnnl.hpp:2213
memory::desc src_iter_desc() const
Queries source recurrent hidden state memory descriptor.
Definition: dnnl.hpp:4593
int64_t dnnl_dim_t
A type to describe tensor dimension.
Definition: dnnl_types.h:778
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: dnnl.hpp:2614
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: dnnl.hpp:2074
5D CNN activations tensor, an alias to dnnl_acdeb
Definition: dnnl_types.h:360
2D CNN activations tensor, an alias to dnnl_ba
Definition: dnnl_types.h:342
A class that provides the destructor for an DNNL C handle.
Definition: dnnl.hpp:78
Local response normalization for forward propagation.
Definition: dnnl.hpp:2917
A sum primitive.
Definition: dnnl_types.h:625
An opaque structure to describe a memory.
Initializes an inner product descriptor for backward propagation with respect to data using memory de...
Definition: dnnl.hpp:4017
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: dnnl.hpp:2049
source memory desc
Definition: dnnl_types.h:1602
memory consumption (bytes)
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:3890
dnnl_memory_desc_t data
The underlying C API data structure.
Definition: dnnl.hpp:1375
Undefined primitive.
Definition: dnnl_types.h:617
dnnl_status_t DNNL_API dnnl_primitive_execute(const_dnnl_primitive_t primitive, dnnl_stream_t stream, int nargs, const dnnl_exec_arg_t *args)
Executes a primitive using a stream, and nargs arguments args.
LBR_GRU for backward propagation.
Definition: dnnl.hpp:5290
Descriptor for layer normalization forward propagation.
Definition: dnnl.hpp:3703
softmax descriptor
Definition: dnnl_types.h:1590
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:3328
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: dnnl.hpp:4289
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:2171
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e, const deconvolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Initializes a primitive descriptor for deconvolution backward propagation with attributes defined by ...
Definition: dnnl.hpp:2709
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for softmax forward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:3383
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: dnnl.hpp:4967
A tensor in a generic format described by the stride and blocking values in each dimension.
Definition: dnnl_types.h:95
desc(algorithm aalgorithm, const memory::desc &src0, const memory::desc &src1, const memory::desc &dst)
Initializes a binary descriptor using algorithm, memory descriptors src0_desc, src1_desc and dst_desc...
Definition: dnnl.hpp:5591
dnnl_status_t DNNL_API dnnl_primitive_attr_create(dnnl_primitive_attr_t *attr)
Creates an empty (default) attr attribute.
permuted 5D tensor
Definition: dnnl_types.h:206
Convolution algorithm(either direct or Winograd) is chosen just in time.
Bidirectional execution of RNN primitive with summation of the results.
Definition: dnnl_types.h:1230
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:4322
primitive::kind kind(int index) const
Returns the kind of post operation with index index.
Definition: dnnl.hpp:601
dnnl_status_t DNNL_API dnnl_stream_destroy(dnnl_stream_t stream)
Destroys an execution stream.
permuted 5D tensor
Definition: dnnl_types.h:192
A pooling primitive.
Definition: dnnl_types.h:635
A user shall query and provide the scratchpad memory to primitives.
Forward data propagation (training mode).
3D CNN activations tensor blocked by channels with block size 16, an alias to dnnl_aBc16b ...
Definition: dnnl_types.h:457
Initializes an inner product descriptor for backward propagation with respect to weights using memory...
Definition: dnnl.hpp:4084
number of inputs expected
dnnl_status_t DNNL_API dnnl_primitive_attr_get_scratchpad_mode(const_dnnl_primitive_attr_t attr, dnnl_scratchpad_mode_t *mode)
Returns the scratchpad mode set in the attribute attr.
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:3115
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: dnnl.hpp:4928
weights memory descriptor desc
Definition: dnnl_types.h:1604
memory::desc diff_weights_iter_desc() const
Queries diff weights iteration memory descriptor.
Definition: dnnl.hpp:4825
4D CNN activations tensor, an alias to dnnl::memory::format_tag::abcd
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: dnnl.hpp:5257
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: dnnl.hpp:3987
4D CNN activations tensor blocked by channels with block size 4, an alias to dnnl_aBcd4b ...
Definition: dnnl_types.h:451
dnnl_status_t DNNL_API dnnl_dilated_convolution_forward_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a dilated convolution descriptor conv_desc for forward propagation using prop_kind (possi...
plain 4D tensor
Definition: dnnl_types.h:186
dnnl_status_t DNNL_API dnnl_memory_desc_init_submemory(dnnl_memory_desc_t *memory_desc, const dnnl_memory_desc_t *parent_memory_desc, const dnnl_dims_t dims, const dnnl_dims_t offsets)
Initializes a memory_desc for a given parent_memory_desc, with dims sizes and offsets.
The operation was successful.
Definition: dnnl_types.h:52
Descriptor for batch normalization backward propagation.
Definition: dnnl.hpp:3582
plain 6D tensor
Definition: dnnl_types.h:188
memory::desc diff_dst_iter_desc() const
Queries diff destination iteration memory descriptor.
Definition: dnnl.hpp:4503
memory::desc diff_weights_layer_desc() const
Queries diff weights layer memory descriptor.
Definition: dnnl.hpp:4820
A descriptor of a pooling operation.
Definition: dnnl_types.h:1069
A (out-of-place) concat primitive.
Definition: dnnl_types.h:623
Eltwise: parametric exponential linear unit (elu)
Definition: dnnl_types.h:670
kind get_kind() const
Returns the kind of the engine.
Definition: dnnl.hpp:885
A memory descriptor.
Definition: dnnl.hpp:1372
destination grad. memory desc
Definition: dnnl_types.h:1607
source gradient memory desc
Definition: dnnl_types.h:1603
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:2187
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: dnnl.hpp:5094
desc(const dims &adims, data_type adata_type, format_tag aformat_tag)
Constructs a memory descriptor.
Definition: dnnl.hpp:1385
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: dnnl.hpp:4885
8-bit signed integer.
Definition: dnnl_types.h:80
memory::desc diff_dst_iter_desc() const
Queries diff destination iteration memory descriptor.
Definition: dnnl.hpp:5150
16-bit/half-precision floating point.
Backward bias propagation.
Definition: dnnl_types.h:610
4D tensor blocked by 2nd dimension with block size 8
Definition: dnnl_types.h:245
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: dnnl.hpp:3497
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: dnnl.hpp:4621
dnnl_status_t DNNL_API dnnl_gru_backward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *diff_src_layer_desc, const dnnl_memory_desc_t *diff_src_iter_desc, const dnnl_memory_desc_t *diff_weights_layer_desc, const dnnl_memory_desc_t *diff_weights_iter_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_layer_desc, const dnnl_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.
dnnl_status_t DNNL_API dnnl_primitive_desc_destroy(dnnl_primitive_desc_t primitive_desc)
Deletes a primitive_desc.
Bidirectional execution of RNN primitive with concatenation of the results.
Definition: dnnl_types.h:1227
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:2880
const dnnl_memory_desc_t DNNL_API * dnnl_primitive_desc_query_md(const_dnnl_primitive_desc_t primitive_desc, dnnl_query_t what, int index)
Queries primitive descriptor for memory descriptor.
memory::desc diff_weights_layer_desc() const
Queries diff weights layer memory descriptor.
Definition: dnnl.hpp:5431
Out-of-order execution.
Definition: dnnl_types.h:1625
dnnl_status_t DNNL_API dnnl_post_ops_get_params_eltwise(const_dnnl_post_ops_t post_ops, int index, float *scale, dnnl_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 local response normalization forward propagation.
Definition: dnnl.hpp:2941
Descriptor for LSTM forward propagation.
Definition: dnnl.hpp:4519
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: dnnl.hpp:5102
An opaque structure to describe a primitive descriptor iterator.
A tensor in a generic format described by the stride and blocking values in each dimension.
workspace memory desc
Definition: dnnl_types.h:1608
memory::desc diff_src_layer_desc() const
Queries diff source layer memory descriptor.
Definition: dnnl.hpp:5418
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: dnnl.hpp:2098
memory(const desc &md, const engine &aengine)
Constructs a memory.
Definition: dnnl.hpp:1469
An execution engine.
Definition: dnnl.hpp:821
Backward data propagation.
Definition: dnnl_types.h:606
no query
Definition: dnnl_types.h:1559
Average pooling include padding.
GRU for forward propagation.
Definition: dnnl.hpp:4862
Primitive descriptor for layer normalization forward propagation.
Definition: dnnl.hpp:3737
convolution_backward_data(const primitive_desc &pd)
Creates a convolution backward propagation primitive from the corresponding primitive descriptor...
Definition: dnnl.hpp:2300
const char * impl_info_str() const
Returns implementation name.
Definition: dnnl.hpp:1608
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: dnnl.hpp:5380
void unmap_data(void *mapped_ptr) const
Unmaps the previously mapped data for the memory.
Definition: dnnl.hpp:1534
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: dnnl.hpp:4954
scratchpad memory desc
Definition: dnnl_types.h:1609
Descriptor for local response normalization backward propagation.
Definition: dnnl.hpp:2986
Primitive descriptor for inner product backward propagation with respect to weights.
Definition: dnnl.hpp:4111
4D tensor blocked by 2nd dimension with block size 4
Definition: dnnl_types.h:237
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:4974
deconvolution descriptor
Definition: dnnl_types.h:1587
dnnl_status_t DNNL_API dnnl_lrn_forward_desc_init(dnnl_lrn_desc_t *lrn_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *data_desc, dnnl_dim_t local_size, float alpha, float beta, float k)
Initializes an lrn_desc for forward propagation using prop_kind (possible values are dnnl_forward_tra...
GRU cell with linear before reset.
dnnl_status_t DNNL_API dnnl_post_ops_append_sum(dnnl_post_ops_t post_ops, float scale)
Appends accumulation (sum) post operation to the post_ops.
Backward propagation (with respect to all parameters).
dnnl_status_t DNNL_API dnnl_batch_normalization_backward_desc_init(dnnl_batch_normalization_desc_t *bnrm_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, float epsilon, unsigned flags)
Initializes a batch normalization descriptor bnrm_desc for backward propagation with respect to data ...
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: dnnl.hpp:5244
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: dnnl.hpp:4539
Descriptor for local response normalization forward propagation.
Definition: dnnl.hpp:2920
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:4134
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for convolution forward propagation from a C primitive descriptor ...
Definition: dnnl.hpp:2165
LSTM for backward propagation.
Definition: dnnl.hpp:4654
engine(kind akind, size_t index)
Constructs an engine.
Definition: dnnl.hpp:850
dnnl_status_t DNNL_API dnnl_convolution_backward_data_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a convolution descriptor conv_desc for backward propagation with respect to data using al...
memory::dim query_s64(query q) const
Queries the memory::dim value (same as int64_t).
Definition: dnnl.hpp:1617
dnnl_status_t DNNL_API dnnl_primitive_create(dnnl_primitive_t *primitive, const_dnnl_primitive_desc_t primitive_desc)
Creates a primitive using a primitive_desc descriptor.
int DNNL_API dnnl_memory_desc_equal(const dnnl_memory_desc_t *lhs, const dnnl_memory_desc_t *rhs)
Compares two memory descriptors.
memory::desc diff_weights_desc() const
Queries diff weights memory descriptor.
Definition: dnnl.hpp:2441
memory::desc mean_desc() const
Queries mean memory descriptor.
Definition: dnnl.hpp:3770
16-bit/half-precision floating point.
Definition: dnnl_types.h:72
dnnl_primitive_kind_t DNNL_API dnnl_post_ops_get_kind(const_dnnl_post_ops_t post_ops, int index)
Returns the kind of post operation with index index in given post_ops.
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: dnnl.hpp:655
op descriptor
Definition: dnnl_types.h:1585
dnnl_status_t DNNL_API dnnl_primitive_desc_get_attr(const_dnnl_primitive_desc_t primitive_desc, const_dnnl_primitive_attr_t *attr)
Returns a constant reference to the attribute of a primitive_desc.
Undefined memory format tag.
Definition: dnnl_types.h:172
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: dnnl.hpp:5398
propagation kind
Definition: dnnl_types.h:1581
dnnl_status_t DNNL_API dnnl_layer_normalization_forward_desc_init(dnnl_layer_normalization_desc_t *lnrm_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, const dnnl_memory_desc_t *stat_desc, float epsilon, unsigned flags)
Initializes a layer normalization descriptor lnrm_desc for forward propagation using prop_kind (possi...
memory::desc diff_src_desc() const
Queries diff source gradient memory descriptor.
Definition: dnnl.hpp:2281
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: dnnl.hpp:4490
memory::desc weights_desc() const
Queries weights (scale and shift) memory descriptor.
Definition: dnnl.hpp:3882
dnnl_status_t DNNL_API dnnl_dilated_convolution_backward_data_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a dilated convolution descriptor conv_desc for backward propagation with respect to data ...
dnnl_normalization_flags_t
Flags for batch normalization primitive.
Definition: dnnl_types.h:726
Inner product for forward propagation.
Definition: dnnl.hpp:3928
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:3185
A descriptor of a binary operation.
Definition: dnnl_types.h:1302
Eltwise: bounded_relu.
Definition: dnnl_types.h:680
memory::desc src_iter_desc() const
Queries source iteration memory descriptor.
Definition: dnnl.hpp:4284
engine get_engine() const
Returns the engine of the primitive descriptor.
Definition: dnnl.hpp:1605
inner product descriptor
Definition: dnnl_types.h:1595
4D CNN weights tensor, an alias to dnnl_bcda
Definition: dnnl_types.h:381
Element-wise operations for backward propagation.
Definition: dnnl.hpp:3277
2D CNN activations tensor, an alias to dnnl::memory::format_tag::ab
deconvolution_backward_data(const primitive_desc &pd)
Creates a deconvolution backward propagation primitive from the corresponding primitive descriptor...
Definition: dnnl.hpp:2742
primitive kind
Definition: dnnl_types.h:1562
void set_rnn_data_qparams(float scale, float shift)
Sets quantization scale and shift for RNN data tensors.
Definition: dnnl.hpp:769
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: dnnl.hpp:4741
An element-wise primitive.
Packed weights format used in RNN.
Definition: dnnl_types.h:99
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: dnnl.hpp:4142
Initializes an eltwise descriptor for forward propagation using prop_kind (possible values are dnnl::...
Definition: dnnl.hpp:3230
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:5413
T get(bool allow_emtpy=false) const
Returns the value of the underlying C handle.
Definition: dnnl.hpp:133
Inner product for backward propagation with respect to weights.
Definition: dnnl.hpp:4077
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e, bool allow_empty=false)
Initializes primitive descriptor for deconvolution forward propagation with attributes defined by att...
Definition: dnnl.hpp:2598
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: dnnl.hpp:2888
Use scale and shift parameters.
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: dnnl.hpp:5393
A descriptor of a convolution operation.
Definition: dnnl_types.h:957
3D CNN activations tensor, an alias to dnnl_acb
Definition: dnnl_types.h:350
dnnl_status_t DNNL_API dnnl_memory_destroy(dnnl_memory_t memory)
Deletes a memory.
dnnl_status_t DNNL_API dnnl_engine_get_ocl_device(dnnl_engine_t engine, cl_device_id *device)
Returns an OpenCL device associated with an engine.
dnnl_status_t DNNL_API dnnl_memory_set_data_handle(dnnl_memory_t memory, void *handle)
For a memory, sets the data handle.
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for local response normalization forward propagation from a C prim...
Definition: dnnl.hpp:2957
memory::desc src_iter_desc() const
Queries source iter memory descriptor.
Definition: dnnl.hpp:5071
dnnl_primitive_kind_t
Kinds of primitives.
Definition: dnnl_types.h:615
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for GRU forward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:4922
permuted 5D tensor
Definition: dnnl_types.h:194
Default stream configuration.
Definition: dnnl_types.h:1627
format_kind
Memory format kind.
Definition: dnnl.hpp:1060
desc(const dnnl_memory_desc_t &adata)
Constructs a memory descriptor from a C API data structure.
Definition: dnnl.hpp:1413
Base class for all computational primitives.
Definition: dnnl.hpp:181
Backward weights propagation.
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:3984
data_type
Data type specification.
Definition: dnnl.hpp:1042
dnnl_status_t DNNL_API dnnl_memory_desc_init_by_strides(dnnl_memory_desc_t *memory_desc, int ndims, const dnnl_dims_t dims, dnnl_data_type_t data_type, const dnnl_dims_t strides)
Initializes a memory_desc memory descriptor using ndims, dims, data_type, and strides.
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:4641
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: dnnl.hpp:4759
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: dnnl.hpp:3410
Binary add.
Definition: dnnl_types.h:720
Creates an out-of-place sum primitive descriptor for sum of n inputs multiplied by the scale with res...
Definition: dnnl.hpp:1898
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for deconvolution forward propagation from a C primitive descripto...
Definition: dnnl.hpp:2605
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: dnnl.hpp:5076
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: dnnl.hpp:5406
batch normalization descriptor
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for shuffle forward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:5505
5D CNN weights tensor, an alias to dnnl_abcde
Definition: dnnl_types.h:385
memory::desc src_iter_desc() const
Queries source iteration memory descriptor.
Definition: dnnl.hpp:4936
Descriptor for LBR GRU forward propagation.
Definition: dnnl.hpp:5167
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: dnnl.hpp:2675
memory::desc diff_src_desc() const
Queries diff source gradient memory descriptor.
Definition: dnnl.hpp:4055
Batch normalization for forward propagation.
Definition: dnnl.hpp:3483
Convolution forward propagation.
Definition: dnnl.hpp:2035
Primitive descriptor for deconvolution weight update.
Definition: dnnl.hpp:2854
memory::desc mean_desc() const
Queries mean memory descriptor.
Definition: dnnl.hpp:3634
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:3192
source gradient memory desc
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:3650
Initializes an eltwise descriptor for backward propagation using aalgorithm algorithm memory descript...
Definition: dnnl.hpp:3282
shuffle descriptor
Definition: dnnl_types.h:1588
memory::desc diff_src_iter_desc() const
Queries diff source iteration memory descriptor.
Definition: dnnl.hpp:5426
cl_command_queue get_ocl_command_queue() const
Returns the OpenCL command queue associated with the stream.
Definition: dnnl.hpp:985
binary descriptor
Definition: dnnl_types.h:1598
memory::desc scratchpad_desc() const
Queries scratchpad memory descriptor.
Definition: dnnl.hpp:1642
Element-wise operations for forward propagation.
Definition: dnnl.hpp:3224
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: dnnl.hpp:4946
Local response normalization for backward propagation.
Definition: dnnl.hpp:2983
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: dnnl.hpp:4777
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: dnnl.hpp:5137
runtime estimation (seconds)
Definition: dnnl_types.h:1567
dnnl_status_t DNNL_API dnnl_primitive_attr_set_scratchpad_mode(dnnl_primitive_attr_t attr, dnnl_scratchpad_mode_t mode)
Sets scratchpad mode.
dnnl_status_t DNNL_API dnnl_stream_get_ocl_command_queue(dnnl_stream_t stream, cl_command_queue *queue)
Returns the OpenCL command queue associated with an execution stream.
memory::desc diff_src_iter_desc() const
Queries diff source recurrent hidden state memory descriptor.
Definition: dnnl.hpp:4810
An opaque structure to describe an engine.
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:3264
primitive_desc(const_dnnl_op_desc_t desc, const primitive_attr *attr, const engine &e, const_dnnl_primitive_desc_t hint_fwd_pd, bool allow_empty=false)
Creates a primitive descriptor from given op_desc, attr, engine, and optionally a hint primitive desc...
Definition: dnnl.hpp:1978
A (out-of-place) concat primitive.
Vanilla RNN for forward propagation.
Definition: dnnl.hpp:4207
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:2438
dnnl_status_t DNNL_API dnnl_primitive_attr_get_output_scales(const_dnnl_primitive_attr_t attr, dnnl_dim_t *count, int *mask, const float **scales)
Returns count, correspondence scale mask, and a pointer to a constant floating point array of output ...
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:2971
6D tensor blocked by 2nd dimension with block size 4
Definition: dnnl_types.h:293
5D CNN weights tensor (incl. groups), an alias to dnnl_acbde
Definition: dnnl_types.h:400
memory::desc query_md(query what, int idx=0) const
Queries and returns requested memory descriptor.
Definition: dnnl.hpp:1625
memory::desc variance_desc() const
Queries variance memory descriptor.
Definition: dnnl.hpp:3877
DNNL exception class.
Definition: dnnl.hpp:52
dnnl_status_t DNNL_API dnnl_inner_product_forward_desc_init(dnnl_inner_product_desc_t *ip_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc)
Initializes an inner product descriptor ip_desc for forward propagation using prop_kind (possible val...
Eltwise: linear.
Definition: dnnl_types.h:678
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: dnnl.hpp:4434
dnnl_status_t DNNL_API dnnl_vanilla_rnn_backward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, const dnnl_alg_kind_t activation, const dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *diff_src_layer_desc, const dnnl_memory_desc_t *diff_src_iter_desc, const dnnl_memory_desc_t *diff_weights_layer_desc, const dnnl_memory_desc_t *diff_weights_iter_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_layer_desc, const dnnl_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.
8-bit unsigned integer.
Definition: dnnl_types.h:82
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: dnnl.hpp:5311
plain 2D tensor
Definition: dnnl_types.h:184
permuted 4D tensor
Definition: dnnl_types.h:204
Backward weights propagation.
Definition: dnnl_types.h:608
A descriptor of a element-wise operation.
Definition: dnnl_types.h:1017
A descriptor of a Softmax operation.
Definition: dnnl_types.h:1053
dnnl_status_t DNNL_API dnnl_primitive_destroy(dnnl_primitive_t primitive)
Deletes a primitive.
Descriptor for convolution weight update.
Definition: dnnl.hpp:2310
An opaque structure for a chain of post operations.
algorithm
Kinds of algorithms.
Definition: dnnl.hpp:296
A descriptor of an inner product operation.
Definition: dnnl_types.h:1188
dnnl_status_t DNNL_API dnnl_engine_destroy(dnnl_engine_t engine)
Destroys an engine.
An LRN primitive.
Definition: dnnl_types.h:637
Descriptor for deconvolution weight update.
Definition: dnnl.hpp:2752
int len() const
Returns the length of post operations.
Definition: dnnl.hpp:598
A batch normalization primitive.
Definition: dnnl_types.h:639
Pooling for forward propagation.
Definition: dnnl.hpp:3062
A rnn primitive.
Definition: dnnl_types.h:645
Average pooling include padding.
Definition: dnnl_types.h:697
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: dnnl.hpp:2174
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: dnnl.hpp:4416
primitive_desc(const desc &desc, const engine &e, const convolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Initializes primitive descriptor for convolution backward propagation.
Definition: dnnl.hpp:2259
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for inner product forward propagation from a C primitive descripto...
Definition: dnnl.hpp:3978
dnnl_status_t DNNL_API dnnl_binary_desc_init(dnnl_binary_desc_t *binary_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src0_desc, const dnnl_memory_desc_t *src1_desc, const dnnl_memory_desc_t *dst_desc)
Initializes a binary descriptor binary_desc, alg_kind (possible values are dnnl_binary_add and dnnl_b...
Local response normalization (LRN) across multiple channels.
Definition: dnnl_types.h:702
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: dnnl.hpp:3139
handle(T t, bool weak=false)
Constructs a C handle wrapper from a C handle.
Definition: dnnl.hpp:123
memory::desc diff_src_desc() const
Queries diff source memory descriptor.
Definition: dnnl.hpp:3180
Undefined data type, used for empty memory descriptors.
memory::desc dst_iter_c_desc() const
Queries destination recurrent cell state memory descriptor.
Definition: dnnl.hpp:4634
error(dnnl_status_t astatus, const char *amessage)
Constructs an error instance.
Definition: dnnl.hpp:60
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:3120
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: dnnl.hpp:4772
memory::desc diff_weights_layer_desc() const
Queries diff weights layer memory descriptor.
Definition: dnnl.hpp:5127
Primitive descriptor for batch normalization forward propagation.
Definition: dnnl.hpp:3509
dnnl_rnn_flags_t
Flags for RNN cell.
Definition: dnnl_types.h:1217
dnnl_status_t DNNL_API dnnl_post_ops_destroy(dnnl_post_ops_t post_ops)
Deletes a post_ops sequence.
dnnl_status_t DNNL_API dnnl_sum_primitive_desc_create(dnnl_primitive_desc_t *sum_primitive_desc, const dnnl_memory_desc_t *dst_mds, int n, const float *scales, const dnnl_memory_desc_t *src_mds, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine)
Creates out-of-place sum_primitive_desc for sum of n inputs multiplied by scale with resulting output...
weights memory descriptor desc
Use scale and shift parameters.
Definition: dnnl_types.h:751
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: dnnl.hpp:4585
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for layer normalization backward propagation from a C primitive de...
Definition: dnnl.hpp:3864
primitive_desc(const desc &desc, const engine &e, bool allow_empty=false)
Initializes a primitive descriptor for deconvolution forward propagation.
Definition: dnnl.hpp:2591
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: dnnl.hpp:5081
dnnl_status_t DNNL_API dnnl_lrn_backward_desc_init(dnnl_lrn_desc_t *lrn_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, dnnl_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...
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:3320
4D tensor blocked by 2nd dimension with block size 16
Definition: dnnl_types.h:231
dnnl_status_t DNNL_API dnnl_primitive_desc_clone(dnnl_primitive_desc_t *primitive_desc, const_dnnl_primitive_desc_t existing_primitive_desc)
Makes a copy of a primitive_desc.
dnnl_format_tag_t
Memory format tag specification.
Definition: dnnl_types.h:170
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: dnnl.hpp:5262
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:5277
stream & wait()
Waits for all primitives in the stream to finish.
Definition: dnnl.hpp:994
weights grad. memory desc
for creating scratchpad memory
Definition: dnnl_types.h:1576
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:3647
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for batch normalization forward propagation from a C primitive des...
Definition: dnnl.hpp:3524
Shuffle for forward propagation.
Definition: dnnl.hpp:5475
dnnl_status_t DNNL_API dnnl_inner_product_backward_data_desc_init(dnnl_inner_product_desc_t *ip_desc, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_dst_desc)
Initializes an inner product descriptor ip_desc for backward propagation with respect to data using m...
Eltwise: gelu.
Definition: dnnl_types.h:691
post_ops()
Creates an empty sequence of post operations.
Definition: dnnl.hpp:590
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:3759
dnnl_status_t DNNL_API dnnl_lstm_backward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *src_iter_c_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *dst_iter_c_desc, const dnnl_memory_desc_t *diff_src_layer_desc, const dnnl_memory_desc_t *diff_src_iter_desc, const dnnl_memory_desc_t *diff_src_iter_c_desc, const dnnl_memory_desc_t *diff_weights_layer_desc, const dnnl_memory_desc_t *diff_weights_iter_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_layer_desc, const dnnl_memory_desc_t *diff_dst_iter_desc, const dnnl_memory_desc_t *diff_dst_iter_c_desc, unsigned flags)
Initializes an LSTM descriptor rnn_desc for backward propagation using prop_kind, direction...
bool next_impl()
Advances the next implementation for the given op descriptor.
Definition: dnnl.hpp:1998
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for RNN backward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:4411
weights grad. memory desc
Definition: dnnl_types.h:1605
Backward propagation (with respect to all parameters).
Definition: dnnl_types.h:604
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:3451
dnnl_status_t
Status values returned by the library functions.
Definition: dnnl_types.h:50
const void * const_dnnl_op_desc_t
A pointer to any of the operation descriptors (constant variant).
Definition: dnnl_types.h:954
Implements primitive descriptor and primitive for concat.
Definition: dnnl.hpp:1838
Primitive attributes.
Definition: dnnl.hpp:675
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: dnnl.hpp:5367
dnnl_status_t DNNL_API dnnl_primitive_get_primitive_desc(const_dnnl_primitive_t primitive, const_dnnl_primitive_desc_t *primitive_desc)
Retrieves a reference to the primitive_desc descriptor of given primitive.
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: dnnl.hpp:2286
2D RNN statistics tensor, an alias to dnnl_ab
Definition: dnnl_types.h:344
4D CNN weights tensor, an alias to dnnl_cdba
Definition: dnnl_types.h:377
4D CNN activations tensor, an alias to dnnl_abcd
Definition: dnnl_types.h:352
kind
Kinds of primitives.
Definition: dnnl.hpp:189
number of outputs expected
Definition: dnnl_types.h:1565
primitive_desc(dnnl_primitive_desc_t cpd)
Initializes a primitive descriptor for inner product weights update from a C primitive descriptor cpd...
Definition: dnnl.hpp:4129
primitive_attr(dnnl_primitive_attr_t attr)
Creates primitive attributes from a C dnnl_primitive_attr_t handle.
Definition: dnnl.hpp:689
Vanilla RNN for backward propagation.
Definition: dnnl.hpp:4335
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for layer normalization forward propagation from a C primitive des...
Definition: dnnl.hpp:3752
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:2893
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:3034
layer normalization backward propagation.
Definition: dnnl.hpp:3807
dnnl_status_t DNNL_API dnnl_pooling_backward_desc_init(dnnl_pooling_desc_t *pool_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t kernel, const dnnl_dims_t padding_l, const dnnl_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.
4D RNN states tensor in the format (num_layers, num_directions, batch, state channels).
Definition: dnnl_types.h:410
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: dnnl.hpp:4302
dnnl_status_t DNNL_API dnnl_reorder_primitive_desc_create(dnnl_primitive_desc_t *reorder_primitive_desc, const dnnl_memory_desc_t *src_md, dnnl_engine_t src_engine, const dnnl_memory_desc_t *dst_md, dnnl_engine_t dst_engine, const_dnnl_primitive_attr_t attr)
Initializes a reorder_primitive_desc using the description of the source (src_engine and src_md) and ...
memory::desc diff_src_layer_desc() const
Queries diff source layer memory descriptor.
Definition: dnnl.hpp:4467
Unidirectional execution of RNN primitive from left to right.
Definition: dnnl_types.h:1222
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: dnnl.hpp:2446
dnnl_status_t DNNL_API dnnl_primitive_attr_set_rnn_weights_qparams(dnnl_primitive_attr_t attr, dnnl_dim_t count, int mask, const float *weights_scales)
Sets quantization scales weights_scales for RNN weights tensors.
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for LSTM forward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:4579
The operation failed because of incorrect function arguments.
Definition: dnnl_types.h:56
primitive_desc_base(dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind prop_kind1, dnnl::prop_kind prop_kind2)
Constructs a primitive_desc from a C counterpart.
Definition: dnnl.hpp:1691
const char * what() const noexcept override
Returns the explanatory string.
Definition: dnnl.hpp:64
dnnl_rnn_direction_t
A direction of RNN primitive execution.
Definition: dnnl_types.h:1220
Use global statistics.
Definition: dnnl_types.h:738
dnnl_status_t DNNL_API dnnl_memory_get_memory_desc(const_dnnl_memory_t memory, const dnnl_memory_desc_t **memory_desc)
Returns a memory_desc associated with memory.
kind
Kinds of engines.
Definition: dnnl.hpp:826
dnnl_status_t DNNL_API dnnl_memory_get_engine(const_dnnl_memory_t memory, dnnl_engine_t *engine)
Returns an engine associated with memory.
Average pooling exclude padding, alias for dnnl::algorithm::pooling_avg_include_padding.
Direct deconvolution.
Definition: dnnl_types.h:662
Primitive descriptor for batch normalization backward propagation.
Definition: dnnl.hpp:3606
GRU descriptor for backward propagation.
Definition: dnnl.hpp:4990
Eltwise: hyperbolic tangent non-linearity (tanh)
Definition: dnnl_types.h:668
dnnl_status_t DNNL_API dnnl_stream_wait(dnnl_stream_t stream)
Waits for all primitives in the execution stream to finish.
Batch normalization backward propagation.
Definition: dnnl.hpp:3579
dnnl_status_t DNNL_API dnnl_engine_get_ocl_context(dnnl_engine_t engine, cl_context *context)
Returns an OpenCL context associated with an engine.
memory::desc weights_desc() const
Queries weights (scale and shift) memory descriptor.
Definition: dnnl.hpp:3762
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: dnnl.hpp:2622
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:2291
Default stream configuration.
dnnl_status_t DNNL_API dnnl_deconvolution_backward_weights_desc_init(dnnl_deconvolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *diff_weights_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a deconvolution descriptor conv_desc for backward propagation with respect to weights usi...
4D tensor blocked by 2nd dimension with block size 8
Descriptor for batch normalization forward propagation.
Definition: dnnl.hpp:3486
Primitive descriptor for local response normalization backward propagation.
Definition: dnnl.hpp:3006
dnnl_alg_kind_t
Kinds of algorithms.
Definition: dnnl_types.h:653
Descriptor for binary.
Definition: dnnl.hpp:5586
dnnl_status_t DNNL_API dnnl_engine_create(dnnl_engine_t *engine, dnnl_engine_kind_t kind, size_t index)
Creates an engine of particular kind and index.
memory::desc diff_src_layer_desc() const
Queries diff source layer memory descriptor.
Definition: dnnl.hpp:5114
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_forward_desc_init(dnnl_deconvolution_desc_t *conv_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a dilated deconvolution descriptor deconv_desc for forward propagation using prop_kind (p...
dnnl_status_t DNNL_API dnnl_memory_map_data(const_dnnl_memory_t memory, void **mapped_ptr)
For a memory, maps the data of the memory to mapped_ptr.
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:3887
dnnl_status_t DNNL_API dnnl_primitive_attr_clone(dnnl_primitive_attr_t *attr, const_dnnl_primitive_attr_t existing_attr)
Makes a copy of an existing_attr.
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for GRU backward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:5058
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: dnnl.hpp:4060
dnnl_status_t DNNL_API dnnl_engine_get_kind(dnnl_engine_t engine, dnnl_engine_kind_t *kind)
Returns the kind of an engine.
LSTM for forward propagation.
Definition: dnnl.hpp:4516
Eltwise: swish.
Definition: dnnl_types.h:693
dnnl_status_t DNNL_API dnnl_primitive_desc_query(const_dnnl_primitive_desc_t primitive_desc, dnnl_query_t what, int index, void *result)
Queries primitive descriptor.
memory::desc diff_src_desc() const
Queries diff source memory descriptor.
Definition: dnnl.hpp:3895
A descriptor of a shuffle operation.
Definition: dnnl_types.h:1000
void reset(T t, bool weak=false)
Resets the value of a C handle.
Definition: dnnl.hpp:128
Forward data propagation (inference mode).
A deconvolution primitive.
Definition: dnnl_types.h:629
5D CNN activations tensor, an alias to dnnl_abcde
Definition: dnnl_types.h:358
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_backward_weights_desc_init(dnnl_deconvolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *diff_weights_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a dilated deconvolution descriptor conv_desc for backward propagation with respect to wei...
3D CNN activations tensor blocked by channels with block size 8, an alias to dnnl_aBc8b ...
Definition: dnnl_types.h:463
const_dnnl_primitive_desc_t get_primitive_desc() const
Returns the descriptor of the underlying C API primitive.
Definition: dnnl.hpp:239
memory::desc diff_src_desc() const
Queries diff source gradient memory descriptor.
Definition: dnnl.hpp:2723
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:3778
desc submemory_desc(const dims &adims, const dims &offsets)
Constructs a sub-memory descriptor.
Definition: dnnl.hpp:1419
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: dnnl.hpp:5089
Primitive descriptor for LBR_GRU backward propagation.
Definition: dnnl.hpp:5344
int DNNL_API dnnl_post_ops_len(const_dnnl_post_ops_t post_ops)
Returns the length of post operations for given post_ops.
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_backward_data_desc_init(dnnl_deconvolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a dilated deconvolution descriptor conv_desc for backward propagation with respect to dat...
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: dnnl.hpp:4429
2D CNN weights tensor, an alias to dnnl_ab
Definition: dnnl_types.h:363
Convolution backward propagation.
Definition: dnnl.hpp:2201
Weights format used in 8bit Winograd convolution.
Definition: dnnl_types.h:97
Primitive descriptor for deconvolution forward propagation.
Definition: dnnl.hpp:2586
execution engine
Definition: dnnl_types.h:1561
Local response normalization (LRN) across multiple channels.
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: dnnl.hpp:3995
5D RNN weights tensor in the format (num_layers, num_directions, num_gates, output_channels, input_channels).
Definition: dnnl_types.h:424
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e, const convolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Initializes a primitive descriptor for convolution weight update with attributes defined by attr...
Definition: dnnl.hpp:2424
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: dnnl.hpp:4442
Primitive descriptor for RNN forward propagation.
Definition: dnnl.hpp:4255
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: dnnl.hpp:4455
Softmax for forward propagation.
Definition: dnnl.hpp:3349
LRN within a single channel.
Definition: dnnl_types.h:704
Descriptor for deconvolution backward propagation.
Definition: dnnl.hpp:2644
dnnl_status_t DNNL_API dnnl_lbr_gru_backward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_memory_desc_t *diff_src_layer_desc, const dnnl_memory_desc_t *diff_src_iter_desc, const dnnl_memory_desc_t *diff_weights_layer_desc, const dnnl_memory_desc_t *diff_weights_iter_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_layer_desc, const dnnl_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 diff_dst_layer_desc() const
Queries diff destination layer memory descriptor.
Definition: dnnl.hpp:5446
5D tensor blocked by 2nd dimension with block size 4
Definition: dnnl_types.h:267
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: dnnl.hpp:2365
dnnl_stream_flags_t
Stream flags.
Definition: dnnl_types.h:1618
#define DNNL_MAX_NDIMS
Maximum number of dimensions a tensor can have.
Definition: dnnl_types.h:775
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:4462
4D CNN activations tensor, an alias to dnnl_bcda
Definition: dnnl_types.h:356
A user shall query and provide the scratchpad memory to primitives.
Definition: dnnl_types.h:1382
3D RNN data tensor in the format (batch, seq_length, input channels).
Definition: dnnl_types.h:407
memory::desc diff_src_iter_c_desc() const
Queries diff source recurrent cell state memory descriptor.
Definition: dnnl.hpp:4815
4D CNN weights tensor, an alias to dnnl_bacd
Definition: dnnl_types.h:383
dnnl_status_t DNNL_API dnnl_memory_desc_init_by_tag(dnnl_memory_desc_t *memory_desc, int ndims, const dnnl_dims_t dims, dnnl_data_type_t data_type, dnnl_format_tag_t tag)
Initializes a memory_desc memory descriptor using ndims, dims, data_type, and format tag...
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for softmax backward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:3438
Descriptor for GRU forward propagation.
Definition: dnnl.hpp:4865
3D tensor blocked by 2nd dimension with block size 4
Definition: dnnl_types.h:217
Average pooling exclude padding.
Definition: dnnl_types.h:699
A deconvolution primitive.
dnnl_status_t DNNL_API dnnl_post_ops_create(dnnl_post_ops_t *post_ops)
Creates an empty sequence of post operations post_ops.
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: dnnl.hpp:4358
Primitive descriptor for GRU backward propagation.
Definition: dnnl.hpp:5041
memory::desc diff_dst_iter_desc() const
Queries diff destination iteration memory descriptor.
Definition: dnnl.hpp:5454
engine get_engine() const
Returns the engine of the memory.
Definition: dnnl.hpp:1481
destination grad. memory desc
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:4000
memory::desc variance_desc() const
Queries variance memory descriptor.
Definition: dnnl.hpp:3773
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: dnnl.hpp:4941
Eltwise: hyperbolic tangent non-linearity (tanh)
dnnl_status_t DNNL_API dnnl_concat_primitive_desc_create(dnnl_primitive_desc_t *concat_primitive_desc, const dnnl_memory_desc_t *dst_md, int n, int concat_dimension, const dnnl_memory_desc_t *src_mds, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine)
Creates out-of-place concat_primitive_desc for concatenation of n inputs by concat_dimension with res...
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for deconvolution backward propagation from a C primitive descript...
Definition: dnnl.hpp:2718
CPU engine.
Definition: dnnl_types.h:1325
A descriptor of a Layer Normalization operation.
Definition: dnnl_types.h:1156
RNN cell.
Definition: dnnl_types.h:706
3D tensor blocked by 2nd dimension with block size 16
Definition: dnnl_types.h:213
Primitive descriptor for eltwise forward propagation.
Definition: dnnl.hpp:3243
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_next(dnnl_primitive_desc_iterator_t iterator)
Iterates over primitive descriptors.
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_create(dnnl_primitive_desc_iterator_t *iterator, const_dnnl_op_desc_t op_desc, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine, const_dnnl_primitive_desc_t hint_forward_primitive_desc)
Creates a primitive descriptor iterator for given op_desc, attr, engine, and optionally a hint primit...
dnnl_scratchpad_mode_t
Scratchpad mode.
Definition: dnnl_types.h:1378
dnnl_status_t DNNL_API dnnl_primitive_attr_get_post_ops(const_dnnl_primitive_attr_t attr, const_dnnl_post_ops_t *post_ops)
Returns post_ops for given attr.
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: dnnl.hpp:2538
dnnl_status_t DNNL_API dnnl_shuffle_backward_desc_init(dnnl_shuffle_desc_t *shuffle_desc, const dnnl_memory_desc_t *diff_data_desc, int axis, dnnl_dim_t group_size)
Initializes a shuffle_desc for backward propagation using memory descriptor diff_data_desc, axis, and group_size.
5D CNN weights tensor (incl. groups), an alias to dnnl_decab
Definition: dnnl_types.h:398
The library manages scratchpad (default)
dnnl_status_t DNNL_API dnnl_dilated_convolution_backward_weights_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *diff_weights_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t dilates, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a convolution descriptor conv_desc for backward propagation with respect to weights using...
reorder destination engine
Undefined memory format kind, used for empty memory descriptors.
Definition: dnnl_types.h:88
void set_output_scales(int mask, const std::vector< float > &scales)
Sets output scales for primitive operations.
Definition: dnnl.hpp:739
Primitive descriptor for LSTM forward propagation.
Definition: dnnl.hpp:4564
static void wrap_c_api(dnnl_status_t status, const char *message)
A convenience function for wrapping calls to the C API.
Definition: dnnl.hpp:71
dnnl_status_t DNNL_API dnnl_deconvolution_forward_desc_init(dnnl_deconvolution_desc_t *conv_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a deconvolution descriptor deconv_desc for forward propagation using prop_kind (possible ...
convolution_forward(const primitive_desc &pd)
Creates a convolution forward propagation primitive from the corresponding primitive descriptor...
Definition: dnnl.hpp:2194
dnnl_status_t DNNL_API dnnl_memory_unmap_data(const_dnnl_memory_t memory, void *mapped_ptr)
For a memory, unmaps a mapped pointer to the data of the memory.
dnnl_primitive_desc_t DNNL_API dnnl_primitive_desc_iterator_fetch(const_dnnl_primitive_desc_iterator_t iterator)
Fetches the current primitive descriptor.
A softmax primitive.
Definition: dnnl_types.h:633
source engine
Definition: dnnl_types.h:1578
GRU for backward propagation.
Definition: dnnl.hpp:4987
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: dnnl.hpp:2234
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: dnnl.hpp:2785
Inner product for backward propagation with respect to data.
Definition: dnnl.hpp:4010
dnnl_status_t DNNL_API dnnl_convolution_backward_weights_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *diff_weights_desc, const dnnl_memory_desc_t *diff_bias_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a convolution descriptor conv_desc for backward propagation with respect to weights using...
dnnl_status_t DNNL_API dnnl_primitive_attr_set_output_scales(dnnl_primitive_attr_t attr, dnnl_dim_t count, int mask, const float *scales)
Sets output scales for primitive operations.
LBR_GRU for forward propagation.
Definition: dnnl.hpp:5164
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:3907
A base class for descriptors of all primitives that have an operation descriptor and that support ite...
Definition: dnnl.hpp:1968
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:2733
Undefined propagation type.
Definition: dnnl_types.h:591
A class for wrapping an DNNL handle.
Definition: dnnl.hpp:94
5D CNN weights tensor (incl. groups), an alias to dnnl_abcde
Definition: dnnl_types.h:396
4D CNN activations tensor blocked by channels with block size 16, an alias to dnnl_aBcd16b ...
Definition: dnnl_types.h:448
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for LBR GRU backward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:5362
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:3112
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: dnnl.hpp:4830
Memory descriptor.
Definition: dnnl_types.h:884
runtime estimation (seconds), unimplemented
Implements descriptor, primitive descriptor, and primitive for the binary.
Definition: dnnl.hpp:5583
Forward data propagation (alias for dnnl_forward_inference).
Definition: dnnl_types.h:600
dnnl_status_t DNNL_API dnnl_pooling_forward_desc_init(dnnl_pooling_desc_t *pool_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides, const dnnl_dims_t kernel, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a pooling descriptor pool_desc for forward propagation using prop_kind (possible values a...
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for LSTM backward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:4736
dnnl_status_t DNNL_API dnnl_convolution_forward_desc_init(dnnl_convolution_desc_t *conv_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a convolution descriptor conv_desc for forward propagation using prop_kind (possible valu...
memory::desc mean_desc() const
Queries mean memory descriptor.
Definition: dnnl.hpp:3874
5D CNN activations tensor blocked by channels with block size 16, an alias to dnnl_aBcde16b ...
Definition: dnnl_types.h:439
6D CNN weights tensor (incl. groups), an alias to dnnl_abcdef
Definition: dnnl_types.h:402
batch normalization descriptor
Definition: dnnl_types.h:1593
void get_params_sum(int index, float &scale) const
Gets the parameters of the accumulation (sum) post operation with index index.
Definition: dnnl.hpp:635
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:3392
Descriptor for softmax backward propagation.
Definition: dnnl.hpp:3405
primitive_attr get_primitive_attr() const
Returns the attributes.
Definition: dnnl.hpp:1658
Deconvolution backward propagation.
Definition: dnnl.hpp:2641
Eltwise: ReLU.
Definition: dnnl_types.h:666
dnnl_status_t DNNL_API dnnl_memory_create(dnnl_memory_t *memory, const dnnl_memory_desc_t *memory_desc, dnnl_engine_t engine, void *handle)
Creates a memory for given memory_desc and engine.
Binary mul.
Definition: dnnl_types.h:722
dnnl_status_t DNNL_API dnnl_lbr_gru_forward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_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.
dnnl_status_t DNNL_API dnnl_stream_create(dnnl_stream_t *stream, dnnl_engine_t engine, unsigned flags)
Creates an execution stream for engine and with flags.
void append_sum(float scale=1.)
Appends accumulation (sum) post operation.
Definition: dnnl.hpp:628
Unidirectional execution of RNN primitive from right to left.
Definition: dnnl_types.h:1224
Undefined propagation kind.
Backward data propagation.
Primitive descriptor for convolution forward propagation.
Definition: dnnl.hpp:2146
memory::desc diff_dst_iter_c_desc() const
Queries diff destination recurrent cell state memory descriptor.
Definition: dnnl.hpp:4848
memory::desc diff_weights_layer_desc() const
Queries diff weights layer memory descriptor.
Definition: dnnl.hpp:4480
dnnl_status_t DNNL_API dnnl_deconvolution_backward_data_desc_init(dnnl_deconvolution_desc_t *conv_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_dst_desc, const dnnl_dims_t strides, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a deconvolution descriptor conv_desc for backward propagation with respect to data using ...
Forward data propagation, alias for dnnl::prop_kind::forward_inference.
Memory that describes the data.
Definition: dnnl.hpp:1031
convolution_backward_weights(const primitive_desc &pd)
Creates convolution weight update primitive from corresponding primitive descriptor.
Definition: dnnl.hpp:2460
engine(const dnnl_engine_t &aengine)
Constructs an engine from other engine aengine.
Definition: dnnl.hpp:871
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: dnnl.hpp:4276
Descriptor for pooling backward propagation.
Definition: dnnl.hpp:3133
memory::desc weights_desc() const
Queries weights (scale and shift) memory descriptor.
Definition: dnnl.hpp:3534
4D CNN weights tensor (incl. groups), an alias to dnnl_abcd
Definition: dnnl_types.h:394
memory::desc diff_weights_iter_desc() const
Queries diff weights iteration memory descriptor.
Definition: dnnl.hpp:5436
number of outputs expected
dnnl_status_t DNNL_API dnnl_primitive_attr_set_rnn_data_qparams(dnnl_primitive_attr_t attr, const float scale, const float shift)
Sets quantization scale and shift for RNN data tensors.
32-bit/single-precision floating point.
memory::desc weights_layer_desc() const
Queries weights layer memory descriptor.
Definition: dnnl.hpp:4603
memory::desc bias_desc() const
Queries bias memory descriptor.
Definition: dnnl.hpp:4616
memory::desc variance_desc() const
Queries variance memory descriptor.
Definition: dnnl.hpp:3637
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:3041
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: dnnl.hpp:4959
engine scratchpad_engine() const
Returns the engine that owns the scratchpad memory.
Definition: dnnl.hpp:1647
Primitive descriptor for softmax backward propagation.
Definition: dnnl.hpp:3420
Initializes a reorder primitive using the description of the source (src_engine and src_md) and desti...
Definition: dnnl.hpp:1752
Initializes an inner product descriptor for forward propagation using prop_kind (possible values are ...
Definition: dnnl.hpp:3939
memory::desc src_iter_c_desc() const
Queries source recurrent cell state memory descriptor.
Definition: dnnl.hpp:4598
memory::desc diff_weights_desc() const
Queries diff weights memory descriptor.
Definition: dnnl.hpp:4137
Descriptor for shuffle forward propagation.
Definition: dnnl.hpp:5478
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:3871
3D CNN weights tensor, an alias to dnnl_abc
Definition: dnnl_types.h:367
query
Primitive descriptor query specification.
Definition: dnnl.hpp:483
LRN within a single channel.
memory::desc diff_src_desc() const
Queries diff source memory descriptor.
Definition: dnnl.hpp:3029
Primitive descriptor for LSTM backward propagation.
Definition: dnnl.hpp:4718
permuted 4D tensor
Definition: dnnl_types.h:201
memory::desc mean_desc() const
Queries mean memory descriptor.
Definition: dnnl.hpp:3549
Placeholder memory format tag.
engine(const handle< dnnl_primitive_desc_t > &pd)
Constructs an engine from the primitive descriptor pd by querying its engine.
Definition: dnnl.hpp:875
Undefined memory format tag.
Definition: dnnl_types.h:175
5D RNN weights tensor in the format (num_layers, num_directions, input_channels, num_gates, output_channels).
Definition: dnnl_types.h:417
dnnl_status_t DNNL_API dnnl_memory_desc_reshape(dnnl_memory_desc_t *out_memory_desc, const dnnl_memory_desc_t *in_memory_desc, int ndims, const dnnl_dims_t dims)
Initializes an out_memory_desc with new ndims and dims from a in_memory_desc.
memory::desc diff_weights_iter_desc() const
Queries diff weights iteration memory descriptor.
Definition: dnnl.hpp:5132
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:3657
memory::desc diff_src_desc() const
Queries diff source memory descriptor.
Definition: dnnl.hpp:3323
dnnl_status_t DNNL_API dnnl_memory_get_data_handle(const_dnnl_memory_t memory, void **handle)
For a memory, returns the data handle.
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for LBR GRU forward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:5225
non-standard 16-bit (bfloat16 w/ 7 bit mantissa) floating point.
dnnl_status_t DNNL_API dnnl_memory_get_ocl_mem_object(const_dnnl_memory_t memory, cl_mem *mem_object)
For a memory returns the OpenCL memory object associated with it.
Fuse with ReLU.
Definition: dnnl_types.h:764
3D CNN activations tensor blocked by channels with block size 4, an alias to dnnl_aBc4b ...
Definition: dnnl_types.h:460
memory::desc diff_dst_desc() const
Queries diff destination memory descriptor.
Definition: dnnl.hpp:2451
primitive_desc(const desc &desc, const engine &e, const deconvolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Initializes a primitive descriptor for deconvolution weight update.
Definition: dnnl.hpp:2858
Undefined memory format tag.
size_t DNNL_API dnnl_engine_get_count(dnnl_engine_kind_t kind)
Returns the number of engines of a particular kind.
Primitive descriptor for RNN backward propagation.
Definition: dnnl.hpp:4393
plain 3D tensor
Definition: dnnl_types.h:185
dnnl_status_t DNNL_API dnnl_lstm_forward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *src_iter_c_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, const dnnl_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.
desc get_desc() const
Returns the descriptor of the memory.
Definition: dnnl.hpp:1473
The base class for all primitive descriptors.
Definition: dnnl.hpp:1599
Primitive descriptor for layer normalization backward propagation.
Definition: dnnl.hpp:3846
Descriptor for RNN forward propagation.
Definition: dnnl.hpp:4210
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:2627
4D RNN bias tensor in the format (num_layers, num_directions, num_gates, output_channels).
Definition: dnnl_types.h:431
prop_kind
Propagation kind.
Definition: dnnl.hpp:265
Eltwise: parametric exponential linear unit (elu)
dnnl_status_t DNNL_API dnnl_softmax_backward_desc_init(dnnl_softmax_desc_t *softmax_desc, const dnnl_memory_desc_t *diff_desc, const dnnl_memory_desc_t *data_desc, int softmax_axis)
Initializes a softmax_desc for backward propagation using memory descriptors diff_desc and data_desc...
permuted 3D tensor
Definition: dnnl_types.h:203
6D tensor blocked by 2nd dimension with block size 16
Definition: dnnl_types.h:289
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e, bool allow_empty=false)
Initializes a primitive descriptor for convolution forward propagation with attributes defined by att...
Definition: dnnl.hpp:2158
An inner product primitive.
A descriptor of a Local Response Normalization (LRN) operation.
Definition: dnnl_types.h:1102
int ndims
Number of dimensions.
Definition: dnnl_types.h:886
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 dnnl::forward_t...
Definition: dnnl.hpp:2928
number of inputs expected
Definition: dnnl_types.h:1564
An element-wise primitive.
Definition: dnnl_types.h:631
void set_rnn_weights_qparams(int mask, const std::vector< float > &scales)
Sets quantization scales weights_scales for RNN weights tensors.
Definition: dnnl.hpp:798
dnnl_status_t DNNL_API dnnl_post_ops_append_eltwise(dnnl_post_ops_t post_ops, float scale, dnnl_alg_kind_t alg, float alpha, float beta)
Appends eltwise post operation to the post_ops with given parameters kind, alpha, and beta (...
desc(prop_kind aprop_kind, const memory::desc &src_desc, const memory::desc &stat_desc, float epsilon, normalization_flags flags)
Initializes a layer normalization descriptor for forward propagation using prop_kind (possible values...
Definition: dnnl.hpp:3714
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: dnnl.hpp:2319
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for RNN forward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:4270
4D CNN activations tensor, an alias to dnnl::memory::format_tag::acdb
Primitive descriptor for inner product forward propagation.
Definition: dnnl.hpp:3963
Direct convolution.
Definition: dnnl_types.h:656
Forward data propagation (alias for dnnl_forward_training).
Definition: dnnl_types.h:602
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: dnnl.hpp:5484
Descriptor for convolution forward propagation.
Definition: dnnl.hpp:2478
cl_mem get_ocl_mem_object() const
Returns the OpenCL memory object associated with the memory.
Definition: dnnl.hpp:1541
memory::desc src_iter_desc() const
Queries source iteration memory descriptor.
Definition: dnnl.hpp:5239
A shuffle primitive.
Definition: dnnl_types.h:621
5D CNN weights tensor, an alias to dnnl_cdeba
Definition: dnnl_types.h:387
Default order execution.
Definition: dnnl_types.h:1621
handle()=default
Empty constructor.
The library manages scratchpad (default)
Definition: dnnl_types.h:1380
Backward bias propagation.
stream(const engine &aengine, flags aflags=flags::default_flags)
Constructs a stream.
Definition: dnnl.hpp:966
memory::desc diff_dst_layer_desc() const
Queries diff destination layer memory descriptor.
Definition: dnnl.hpp:4495
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: dnnl.hpp:5063
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for pooling backward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:3175
Primitive descriptor for GRU forward propagation.
Definition: dnnl.hpp:4907
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: dnnl.hpp:4608
A descriptor of a Batch Normalization operation.
Definition: dnnl_types.h:1128
Eltwise: square root.
Definition: dnnl_types.h:676
memory::desc dst_layer_desc() const
Queries destination layer memory descriptor.
Definition: dnnl.hpp:4447
(scratch) memory, additional to all inputs and outputs memory (bytes)
Definition: dnnl_types.h:1573
permuted 5D tensor
Definition: dnnl_types.h:196
primitive_desc(const desc &desc, const engine &e, const deconvolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Initializes a primitive descriptor for deconvolution backward propagation.
Definition: dnnl.hpp:2701
Primitive or engine failed on execution.
Definition: dnnl_types.h:62
dnnl_prop_kind_t
Kinds of propagation.
Definition: dnnl_types.h:588
scratchpad_mode
Scratchpad mode.
Definition: dnnl.hpp:253
lrn descriptor
Definition: dnnl_types.h:1592
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:3389
permuted 4D tensor
Definition: dnnl_types.h:199
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: dnnl.hpp:2391
Weights format used in 8bit Winograd convolution.
dnnl_status_t DNNL_API dnnl_memory_set_ocl_mem_object(dnnl_memory_t memory, cl_mem mem_object)
For a memory sets the OpenCL memory object associated with it.
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: dnnl.hpp:5187
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: dnnl.hpp:2761
An opaque structure to describe a primitive descriptor.
LBR_GRU descriptor for backward propagation.
Definition: dnnl.hpp:5293
dnnl_status_t DNNL_API dnnl_post_ops_get_params_sum(const_dnnl_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...
memory::desc diff_src_desc() const
Queries diff source memory descriptor.
Definition: dnnl.hpp:3662
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_destroy(dnnl_primitive_desc_iterator_t iterator)
Deletes a primitive descriptor iterator.
bool is_zero() const
Returns true if the memory descriptor describes an empty memory.
Definition: dnnl.hpp:1441
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:3544
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: dnnl.hpp:3593
permuted 2D tensor
Definition: dnnl_types.h:197
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for local response normalization backward propagation from a C pri...
Definition: dnnl.hpp:3024
A binary primitive.
Definition: dnnl_types.h:649
LSTM descriptor for backward propagation.
Definition: dnnl.hpp:4657
An opaque structure to describe an execution stream.
Primitive descriptor for inner product backward propagation with respect to data. ...
Definition: dnnl.hpp:4032
Forward data propagation (inference mode).
Definition: dnnl_types.h:598
Descriptor for layer normalization backward propagation.
Definition: dnnl.hpp:3810
memory::desc diff_src_iter_desc() const
Queries diff source iteration memory descriptor.
Definition: dnnl.hpp:5122
Convolution algorithm(either direct or Winograd) is chosen just in time.
Definition: dnnl_types.h:660
permuted 3D tensor
Definition: dnnl_types.h:198
destination engine
Definition: dnnl_types.h:1579
A layer normalization primitive.
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:3531
GRU cell with linear before reset.
Definition: dnnl_types.h:718
memory::desc diff_src_iter_desc() const
Queries diff source iteration memory descriptor.
Definition: dnnl.hpp:4475
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: dnnl.hpp:4678
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: dnnl.hpp:2489
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for element-wise operations for forward propagation from a C primi...
Definition: dnnl.hpp:3258
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:2611
memory::desc diff_dst_layer_desc() const
Queries diff destination layer memory descriptor.
Definition: dnnl.hpp:5142
Primitive descriptor for deconvolution backward propagation.
Definition: dnnl.hpp:2696
Softmax for backward propagation.
Definition: dnnl.hpp:3402
LSTM cell.
Definition: dnnl_types.h:708
layer normalization descriptor
Definition: dnnl_types.h:1594
convolution descriptor
Definition: dnnl_types.h:1586
layer normalization descriptor
memory::desc weights_desc() const
Queries weights memory descriptor.
Definition: dnnl.hpp:2728
Primitive descriptor for LBR_GRU forward propagation.
Definition: dnnl.hpp:5210
void set_post_ops(post_ops ops)
Sets post_ops for future use.
Definition: dnnl.hpp:756
void set_ocl_mem_object(cl_mem mem_object)
Sets the OpenCL memory object mem_object associated with the memory.
Definition: dnnl.hpp:1549
Undefined memory format kind, used for empty memory descriptors.
dnnl_status_t DNNL_API dnnl_primitive_attr_set_post_ops(dnnl_primitive_attr_t attr, const_dnnl_post_ops_t post_ops)
Sets configured post_ops to an attribute attr for future use (when primitive descriptor is being crea...
memory::desc dst_iter_desc() const
Queries destination recurrent hidden state memory descriptor.
Definition: dnnl.hpp:4785
Eltwise: logistic.
Definition: dnnl_types.h:684
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for convolution weights update from a C primitive descriptor pd...
Definition: dnnl.hpp:2433
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 dnnl::f...
Definition: dnnl.hpp:3358
scratchpad_mode get_scratchpad_mode() const
Returns the scratchpad mode.
Definition: dnnl.hpp:693
dnnl_status_t DNNL_API dnnl_stream_create_ocl(dnnl_stream_t *stream, dnnl_engine_t engine, cl_command_queue queue)
Creates an execution stream for a given engine associated with an OpenCL command queue.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &e, const convolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Initializes primitive descriptor for convolution backward propagation with attributes defined by attr...
Definition: dnnl.hpp:2267
GRU cell.
Definition: dnnl_types.h:710
Undefined data type, used for empty memory descriptors.
Definition: dnnl_types.h:70
memory::desc diff_dst_layer_desc() const
Queries diff destination layer memory descriptor.
Definition: dnnl.hpp:4835
T * map_data() const
Maps the data of the memory.
Definition: dnnl.hpp:1519
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: dnnl.hpp:2833
2D CNN weights tensor, an alias to dnnl_ba
Definition: dnnl_types.h:365
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: dnnl.hpp:2565
Descriptor for pooling forward propagation.
Definition: dnnl.hpp:3065
primitive_desc(const desc &desc, const engine &e, const convolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Initializes a primitive descriptor for convolution weight update.
Definition: dnnl.hpp:2416
memory::desc weights_desc() const
Queries weights (scale and shift) memory descriptor.
Definition: dnnl.hpp:3642
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: dnnl.hpp:2514
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: dnnl.hpp:2343
desc(prop_kind aprop_kind, const memory::desc &diff_data_desc, const memory::desc &data_desc, const memory::desc &stat_desc, float epsilon, normalization_flags flags)
Initializes a layer normalization descriptor for backward propagation with respect to data and scale-...
Definition: dnnl.hpp:3821
Convolution weight update.
Definition: dnnl.hpp:2307
A convolution primitive.
Definition: dnnl_types.h:627
desc()
Constructs a zero memory descriptor.
Definition: dnnl.hpp:1378
4D tensor blocked by 1st and 2nd dimension with block size 8
Definition: dnnl_types.h:250
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for element-wise operations for backward propagation from a C prim...
Definition: dnnl.hpp:3315
Primitive descriptor for softmax forward propagation.
Definition: dnnl.hpp:3368
Primitive descriptor for eltwise backward propagation.
Definition: dnnl.hpp:3297
Descriptor for softmax forward propagation.
Definition: dnnl.hpp:3352
const post_ops get_post_ops() const
Returns post_ops previously set by set_post_ops.
Definition: dnnl.hpp:746
primitive_desc(const desc &desc, const engine &e, bool allow_empty=false)
Initializes a primitive descriptor for convolution forward propagation.
Definition: dnnl.hpp:2151
memory::desc dst_iter_c_desc() const
Queries destination recurrent cell state memory descriptor.
Definition: dnnl.hpp:4790
32-bit/single-precision floating point.
Definition: dnnl_types.h:76
destination memory desc
Definition: dnnl_types.h:1606
memory::desc variance_desc() const
Queries variance memory descriptor.
Definition: dnnl.hpp:3552
memory::desc workspace_desc() const
Queries workspace memory descriptor.
Definition: dnnl.hpp:4797
format_tag
Memory format tag specification.
Definition: dnnl.hpp:1078
Unspecified format kind.
Definition: dnnl_types.h:91
dnnl_status_t DNNL_API dnnl_eltwise_backward_desc_init(dnnl_eltwise_desc_t *eltwise_desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, float alpha, float beta)
Initializes an eltwise_desc for backward propagation using alg_kind algorithm memory descriptors diff...
memory::desc dst_iter_desc() const
Queries destination iteration memory descriptor.
Definition: dnnl.hpp:4315
memory::desc src_layer_desc() const
Queries source layer memory descriptor.
Definition: dnnl.hpp:5231
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for deconvolution weights update from a C primitive descriptor pd...
Definition: dnnl.hpp:2875
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for inner product backward propagation from a C primitive descript...
Definition: dnnl.hpp:4050
primitive_desc(dnnl_primitive_desc_t pd)
Initializes a primitive descriptor for pooling forward propagation from a C primitive descriptor pd...
Definition: dnnl.hpp:3106
memory::desc weights_iter_desc() const
Queries weights iteration memory descriptor.
Definition: dnnl.hpp:4294
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:3443
Just a sentinel, not real memory format tag.
Definition: dnnl_types.h:333
rnn descriptor
Definition: dnnl_types.h:1596
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: dnnl.hpp:2807
eltwise descriptor
Definition: dnnl_types.h:1589
normalization_flags
Flags for batch normalization primitive.
Definition: dnnl.hpp:372
4D CNN activations tensor, an alias to dnnl::memory::format_tag::bcda
Winograd deconvolution.
Definition: dnnl_types.h:664
memory::desc src_desc() const
Queries source memory descriptor.
Definition: dnnl.hpp:3631
primitive_attr()
Creates default primitive attributes.
Definition: dnnl.hpp:679
memory consumption – extra
Definition: dnnl_types.h:1568
size_t get_size() const
Returns the number of bytes required to allocate the memory described including the padding area...
Definition: dnnl.hpp:1438
plain 5D tensor
Definition: dnnl_types.h:187
A layer normalization primitive.
Definition: dnnl_types.h:641
dnnl_engine_kind_t
Kinds of engines.
Definition: dnnl_types.h:1321
Descriptor for convolution backward propagation.
Definition: dnnl.hpp:2204
A batch normalization primitive.
An unspecified engine.
Definition: dnnl_types.h:1323
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:3539
Eltwise: square.
Definition: dnnl_types.h:672
size_t DNNL_API dnnl_memory_desc_get_size(const dnnl_memory_desc_t *memory_desc)
Returns the size (in bytes) that is required for given memory_desc.
An execution stream.
Definition: dnnl.hpp:947
dnnl_status_t DNNL_API dnnl_batch_normalization_forward_desc_init(dnnl_batch_normalization_desc_t *bnrm_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, float epsilon, unsigned flags)
Initializes a batch normalization descriptor bnrm_desc for forward propagation using prop_kind (possi...
dnnl_status_t DNNL_API dnnl_gru_forward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_memory_desc_t *dst_iter_desc, unsigned flags)
Initializes a GRU descriptor rnn_desc for forward propagation using prop_kind, direction, and memory descriptors.
permuted 4D tensor
Definition: dnnl_types.h:195
memory::desc diff_bias_desc() const
Queries diff bias memory descriptor.
Definition: dnnl.hpp:5441
memory::desc dst_desc() const
Queries destination memory descriptor.
Definition: dnnl.hpp:3767
memory::desc diff_weights_iter_desc() const
Queries diff weights iteration memory descriptor.
Definition: dnnl.hpp:4485
dnnl_status_t DNNL_API dnnl_vanilla_rnn_forward_desc_init(dnnl_rnn_desc_t *rnn_desc, dnnl_prop_kind_t prop_kind, const dnnl_alg_kind_t activation, const dnnl_rnn_direction_t direction, const dnnl_memory_desc_t *src_layer_desc, const dnnl_memory_desc_t *src_iter_desc, const dnnl_memory_desc_t *weights_layer_desc, const dnnl_memory_desc_t *weights_iter_desc, const dnnl_memory_desc_t *bias_desc, const dnnl_memory_desc_t *dst_layer_desc, const dnnl_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.
5D tensor blocked by 2nd dimension with block size 16
Definition: dnnl_types.h:260
GPU engine.
Definition: dnnl_types.h:1327
3D RNN data tensor in the format (seq_length, batch, input channels).
Definition: dnnl_types.h:405
dnnl_status_t DNNL_API dnnl_eltwise_forward_desc_init(dnnl_eltwise_desc_t *eltwise_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *data_desc, float alpha, float beta)
Initializes an eltwise_desc for forward propagation using prop_kind (possible values are dnnl_forward...
Post operations.
Definition: dnnl.hpp:586
4D tensor blocked by 1st and 2nd dimension with block size 8
4D CNN activations tensor, an alias to dnnl_acdb
Definition: dnnl_types.h:354
dnnl_status_t DNNL_API dnnl_shuffle_forward_desc_init(dnnl_shuffle_desc_t *shuffle_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, int axis, dnnl_dim_t group_size)
Initializes a shuffle_desc for forward propagation using prop_kind, memory descriptor data_desc...