23 #include "dnnl_config.h" 32 #include <unordered_map> 36 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL 45 #ifndef DNNL_ENABLE_EXCEPTIONS 46 #if __cpp_exceptions || __EXCEPTIONS \ 47 || (defined(_MSC_VER) && !defined(__clang__)) 48 #define DNNL_ENABLE_EXCEPTIONS 1 50 #define DNNL_ENABLE_EXCEPTIONS 0 54 #if defined(__GNUC__) || defined(__clang__) 55 #define DNNL_TRAP() __builtin_trap() 56 #elif defined(__INTEL_COMPILER) || defined(_MSC_VER) 57 #define DNNL_TRAP() __debugbreak() 59 #error "unknown compiler" 62 #if DNNL_ENABLE_EXCEPTIONS 63 #define DNNL_THROW_ERROR(status, msg) throw error(status, msg) 66 #define DNNL_THROW_ERROR(status, msg) \ 87 struct error :
public std::exception {
99 const char *
what() const noexcept
override {
return message; }
112 template <
typename T>
113 void validate_container_size(
const T &v,
const char *error_message,
114 int min_size = 1,
int max_size = -1) {
115 const int size = (int)v.size();
116 if (size < min_size || (max_size >= 0 && size > max_size))
122 template <
typename T>
138 template <
typename T,
typename traits = handle_traits<T>>
142 std::shared_ptr<typename std::remove_pointer<T>::type> data_ {0};
145 bool operator==(
const T other)
const {
return other == data_.get(); }
146 bool operator!=(
const T other)
const {
return !(*
this == other); }
179 void reset(T t,
bool weak =
false) {
180 data_.reset(t, weak ? &dummy_destructor : traits::destructor);
188 T
get(
bool allow_empty =
false)
const {
189 T result = data_.get();
190 if (allow_empty ==
false && result ==
nullptr)
200 explicit operator T()
const {
return get(
true); }
205 explicit operator bool()
const {
return get(
true) !=
nullptr; }
214 return other.data_.get() == data_.get();
261 struct primitive_desc;
358 stream &
stream,
const std::unordered_map<int, memory> &args)
const;
372 "could not get a primitive descriptor from a primitive");
383 "could not get a primitive kind from a primitive descriptor");
473 undef = dnnl_alg_kind_undef,
638 #define DNNL_DEFINE_BITMASK_OPS(enum_name) \ 639 inline enum_name operator|(enum_name lhs, enum_name rhs) { \ 640 return static_cast<enum_name>( \ 641 static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); \ 644 inline enum_name operator&(enum_name lhs, enum_name rhs) { \ 645 return static_cast<enum_name>( \ 646 static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); \ 649 inline enum_name operator^(enum_name lhs, enum_name rhs) { \ 650 return static_cast<enum_name>( \ 651 static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); \ 654 inline enum_name &operator|=(enum_name &lhs, enum_name rhs) { \ 655 lhs = static_cast<enum_name>( \ 656 static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); \ 660 inline enum_name &operator&=(enum_name &lhs, enum_name rhs) { \ 661 lhs = static_cast<enum_name>( \ 662 static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); \ 666 inline enum_name &operator^=(enum_name &lhs, enum_name rhs) { \ 667 lhs = static_cast<enum_name>( \ 668 static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); \ 672 inline enum_name operator~(enum_name rhs) { \ 673 return static_cast<enum_name>(~static_cast<unsigned>(rhs)); \ 874 "could not create an engine");
878 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL 888 &
engine, convert_to_c(
kind), device, context),
889 "could not create an engine");
903 "could not get an engine from a primitive_desc");
904 reset(c_engine,
true);
912 "could not get kind of an engine");
916 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL 920 cl_context context =
nullptr;
922 "could not get an OpenCL context fron an engine");
929 cl_device_id device =
nullptr;
931 "could not get an OpenCL device fron an engine");
941 template <
typename primitive_desc>
951 template <
typename primitive_desc>
956 "could not get an engine from a primitive_desc");
957 return engine(c_engine,
true);
1010 "could not create a stream");
1014 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL 1022 "could not create a stream");
1029 cl_command_queue queue =
nullptr;
1031 "could not get an OpenCL command queue from a stream");
1132 template <
typename T>
1134 validate_container_size(
1373 Abc16a = dnnl_Abc16a,
1374 ABc16a16b = dnnl_ABc16a16b,
1375 ABc4a4b = dnnl_ABc4a4b,
1377 ABc16b16a = dnnl_ABc16b16a,
1380 ABc4b16a4b = dnnl_ABc4b16a4b,
1381 ABc2b8a4b = dnnl_ABc2b8a4b,
1382 ABc4b4a = dnnl_ABc4b4a,
1383 ABc8a16b2a = dnnl_ABc8a16b2a,
1384 ABc8a8b = dnnl_ABc8a8b,
1386 ABc8b16a2b = dnnl_ABc8b16a2b,
1387 ABc8b8a = dnnl_ABc8b8a,
1388 Abcd16a = dnnl_Abcd16a,
1389 ABcd16a16b = dnnl_ABcd16a16b,
1391 ABcd16b16a = dnnl_ABcd16b16a,
1392 aBCd16b16c = dnnl_aBCd16b16c,
1393 aBCd16c16b = dnnl_aBCd16c16b,
1394 Abcd4a = dnnl_Abcd4a,
1396 ABcd4b16a4b = dnnl_ABcd4b16a4b,
1397 ABcd2b8a4b = dnnl_ABcd2b8a4b,
1398 ABcd4b4a = dnnl_ABcd4b4a,
1399 ABcd4a4b = dnnl_ABcd4a4b,
1400 aBCd4c16b4c = dnnl_aBCd4c16b4c,
1401 aBCd2c8b4c = dnnl_aBCd2c8b4c,
1402 aBCd4c4b = dnnl_aBCd4c4b,
1403 aBCd4b4c = dnnl_aBCd4b4c,
1404 ABcd8a16b2a = dnnl_ABcd8a16b2a,
1405 ABcd8a8b = dnnl_ABcd8a8b,
1408 ABcd8b16a2b = dnnl_ABcd8b16a2b,
1409 aBCd8b16c2b = dnnl_aBCd8b16c2b,
1412 aBCd8b8c = dnnl_aBCd8b8c,
1413 aBCd8c16b2c = dnnl_aBCd8c16b2c,
1414 aBCd8c8b = dnnl_aBCd8c8b,
1415 Abcde16a = dnnl_Abcde16a,
1416 ABcde16a16b = dnnl_ABcde16a16b,
1418 ABcde16b16a = dnnl_ABcde16b16a,
1419 aBCde16b16c = dnnl_aBCde16b16c,
1420 aBCde16c16b = dnnl_aBCde16c16b,
1421 aBCde2c8b4c = dnnl_aBCde2c8b4c,
1422 Abcde4a = dnnl_Abcde4a,
1424 ABcde4b4a = dnnl_ABcde4b4a,
1425 ABcde4a4b = dnnl_ABcde4a4b,
1426 aBCde4b4c = dnnl_aBCde4b4c,
1427 aBCde4c16b4c = dnnl_aBCde4c16b4c,
1428 aBCde4c4b = dnnl_aBCde4c4b,
1429 Abcde8a = dnnl_Abcde8a,
1430 ABcde8a8b = dnnl_ABcde8a8b,
1432 ABcde8b16a2b = dnnl_ABcde8b16a2b,
1435 aBCde8b16c2b = dnnl_aBCde8b16c2b,
1436 ABcde8b8a = dnnl_ABcde8b8a,
1437 aBCde8b8c = dnnl_aBCde8b8c,
1438 ABcd4a8b8a4b = dnnl_ABcd4a8b8a4b,
1439 ABcd2a8b8a2b = dnnl_ABcd2a8b8a2b,
1440 aBCde4b8c8b4c = dnnl_aBCde4b8c8b4c,
1441 aBCde2b8c8b2c = dnnl_aBCde2b8c8b2c,
1442 aBCde8c16b2c = dnnl_aBCde8c16b2c,
1443 aBCde8c8b = dnnl_aBCde8c8b,
1445 aBCdef16b16c = dnnl_aBCdef16b16c,
1446 aBCdef16c16b = dnnl_aBCdef16c16b,
1448 aBCdef4c4b = dnnl_aBCdef4c4b,
1449 aBCdef4b4c = dnnl_aBCdef4b4c,
1450 aBCdef8b8c = dnnl_aBCdef8b8c,
1451 aBCdef8c16b2c = dnnl_aBCdef8c16b2c,
1452 aBCdef4c16b4c = dnnl_aBCdef4c16b4c,
1453 aBCdef8c8b = dnnl_aBCdef8c8b,
1454 aBdc16b = dnnl_aBdc16b,
1455 aBdc4b = dnnl_aBdc4b,
1456 aBdc8b = dnnl_aBdc8b,
1457 aBdec16b = dnnl_aBdec16b,
1458 aBdec4b = dnnl_aBdec4b,
1459 aBdec8b = dnnl_aBdec8b,
1460 aBdefc16b = dnnl_aBdefc16b,
1461 aCBdef16c16b = dnnl_aCBdef16c16b,
1462 aCBdef16b16c = dnnl_aCBdef16b16c,
1463 aBdefc4b = dnnl_aBdefc4b,
1464 aBdefc8b = dnnl_aBdefc8b,
1465 Acb16a = dnnl_Acb16a,
1468 aCBd16b16c = dnnl_aCBd16b16c,
1469 aCBd16c16b = dnnl_aCBd16c16b,
1470 aCBde16b16c = dnnl_aCBde16b16c,
1471 aCBde16c16b = dnnl_aCBde16c16b,
1472 Acdb16a = dnnl_Acdb16a,
1473 Acdb4a = dnnl_Acdb4a,
1474 Acdb8a = dnnl_Acdb8a,
1475 Acdeb16a = dnnl_Acdeb16a,
1476 Acdeb4a = dnnl_Acdeb4a,
1477 Acdeb8a = dnnl_Acdeb8a,
1478 BAc16a16b = dnnl_BAc16a16b,
1479 BAc16b16a = dnnl_BAc16b16a,
1480 BAcd16a16b = dnnl_BAcd16a16b,
1481 BAcd16b16a = dnnl_BAcd16b16a,
1482 ABcd32a32b = dnnl_ABcd32a32b,
1483 BAcde16b16a = dnnl_BAcde16b16a,
1484 BAcde16a16b = dnnl_BAcde16a16b,
1485 aBdec32b = dnnl_aBdec32b,
1486 Abcdef16a = dnnl_Abcdef16a,
1487 Acdb32a = dnnl_Acdb32a,
1499 NCw16n16c = dnnl_NCw16n16c,
1500 NChw16n16c = dnnl_NChw16n16c,
1501 NCdhw16n16c = dnnl_NCdhw16n16c,
1502 NChw32n32c = dnnl_NChw32n32c,
1503 IOhw16i16o = dnnl_IOhw16i16o,
1504 Ohwi32o = dnnl_Ohwi32o,
1505 IOdhw16i16o = dnnl_IOdhw16i16o,
1506 gIOhw16i16o = dnnl_gIOhw16i16o,
1507 gOhwi32o = dnnl_gOhwi32o,
1508 Goidhw16g = dnnl_Goidhw16g,
1509 IOw16o16i = dnnl_IOw16o16i,
1510 OIw16i16o = dnnl_OIw16i16o,
1511 IOw16i16o = dnnl_IOw16i16o,
1512 gIOw16i16o = dnnl_gIOw16i16o,
1513 OIw16o16i = dnnl_OIw16o16i,
1514 Oiw16o = dnnl_Oiw16o,
1515 OIw4i16o4i = dnnl_OIw4i16o4i,
1516 OIw2i8o4i = dnnl_OIw2i8o4i,
1517 OIw4i4o = dnnl_OIw4i4o,
1518 OIw4o4i = dnnl_OIw4o4i,
1520 OIw8i16o2i = dnnl_OIw8i16o2i,
1521 OIw8i8o = dnnl_OIw8i8o,
1522 OIw8o16i2o = dnnl_OIw8o16i2o,
1523 OIw8o8i = dnnl_OIw8o8i,
1524 Owi16o = dnnl_Owi16o,
1525 OwI16o2i = dnnl_OwI16o2i,
1528 IOhw16o16i = dnnl_IOhw16o16i,
1529 Ohwi16o = dnnl_Ohwi16o,
1530 OhwI16o2i = dnnl_OhwI16o2i,
1531 Ohwi4o = dnnl_Ohwi4o,
1532 Ohwi8o = dnnl_Ohwi8o,
1533 OIhw16i16o = dnnl_OIhw16i16o,
1534 OIhw16o16i = dnnl_OIhw16o16i,
1535 Oihw16o = dnnl_Oihw16o,
1536 OIhw4i16o4i = dnnl_OIhw4i16o4i,
1537 OIhw4i4o = dnnl_OIhw4i4o,
1538 OIhw4o4i = dnnl_OIhw4o4i,
1539 Oihw4o = dnnl_Oihw4o,
1540 OIhw8i16o2i = dnnl_OIhw8i16o2i,
1541 OIhw8i8o = dnnl_OIhw8i8o,
1542 OIhw8o16i2o = dnnl_OIhw8o16i2o,
1543 OIhw8o8i = dnnl_OIhw8o8i,
1544 OIhw2i8o4i = dnnl_OIhw2i8o4i,
1545 IOdhw16o16i = dnnl_IOdhw16o16i,
1546 Odhwi16o = dnnl_Odhwi16o,
1547 OdhwI16o2i = dnnl_OdhwI16o2i,
1548 Odhwi4o = dnnl_Odhwi4o,
1549 Odhwi8o = dnnl_Odhwi8o,
1550 OIdhw16i16o = dnnl_OIdhw16i16o,
1551 OIdhw16o16i = dnnl_OIdhw16o16i,
1552 Oidhw16o = dnnl_Oidhw16o,
1553 OIdhw4i4o = dnnl_OIdhw4i4o,
1554 OIdhw4o4i = dnnl_OIdhw4o4i,
1555 Oidhw4o = dnnl_Oidhw4o,
1556 OIdhw8i16o2i = dnnl_OIdhw8i16o2i,
1557 OIdhw4i16o4i = dnnl_OIdhw4i16o4i,
1558 OIdhw2i8o4i = dnnl_OIdhw2i8o4i,
1559 OIdhw8i8o = dnnl_OIdhw8i8o,
1560 OIdhw8o8i = dnnl_OIdhw8o8i,
1561 gIOw16o16i = dnnl_gIOw16o16i,
1562 gOIw16i16o = dnnl_gOIw16i16o,
1563 gOIw16o16i = dnnl_gOIw16o16i,
1564 gOiw16o = dnnl_gOiw16o,
1565 gOIw4i16o4i = dnnl_gOIw4i16o4i,
1566 gOIw2i8o4i = dnnl_gOIw2i8o4i,
1567 gOIw4i4o = dnnl_gOIw4i4o,
1568 gOIw4o4i = dnnl_gOIw4o4i,
1569 gOiw4o = dnnl_gOiw4o,
1570 gOIw8i16o2i = dnnl_gOIw8i16o2i,
1571 gOIw8i8o = dnnl_gOIw8i8o,
1572 gOIw8o16i2o = dnnl_gOIw8o16i2o,
1573 gOIw8o8i = dnnl_gOIw8o8i,
1574 gOwi16o = dnnl_gOwi16o,
1575 gOwI16o2i = dnnl_gOwI16o2i,
1576 gOwi4o = dnnl_gOwi4o,
1577 gOwi8o = dnnl_gOwi8o,
1578 Goiw8g = dnnl_Goiw8g,
1579 Goiw16g = dnnl_Goiw16g,
1580 gIOhw16o16i = dnnl_gIOhw16o16i,
1581 gOhwi16o = dnnl_gOhwi16o,
1582 gOhwI16o2i = dnnl_gOhwI16o2i,
1583 gOhwi4o = dnnl_gOhwi4o,
1584 gOhwi8o = dnnl_gOhwi8o,
1585 Goihw16g = dnnl_Goihw16g,
1586 gOIhw16i16o = dnnl_gOIhw16i16o,
1587 gOIhw16o16i = dnnl_gOIhw16o16i,
1588 gOihw16o = dnnl_gOihw16o,
1589 gOIhw4i16o4i = dnnl_gOIhw4i16o4i,
1590 gOIhw2i8o4i = dnnl_gOIhw2i8o4i,
1591 gOIhw4i4o = dnnl_gOIhw4i4o,
1592 gOIhw4o4i = dnnl_gOIhw4o4i,
1593 gOihw4o = dnnl_gOihw4o,
1594 Goihw8g = dnnl_Goihw8g,
1595 gOIhw8i16o2i = dnnl_gOIhw8i16o2i,
1596 gOIhw8i8o = dnnl_gOIhw8i8o,
1597 gOIhw8o16i2o = dnnl_gOIhw8o16i2o,
1598 OIhw4o8i8o4i = dnnl_OIhw4o8i8o4i,
1599 OIhw2o8i8o2i = dnnl_OIhw2o8i8o2i,
1600 gOIhw4o8i8o4i = dnnl_gOIhw4o8i8o4i,
1601 gOIhw2o8i8o2i = dnnl_gOIhw2o8i8o2i,
1602 gOIhw8o8i = dnnl_gOIhw8o8i,
1603 gIOdhw16i16o = dnnl_gIOdhw16i16o,
1604 gIOdhw16o16i = dnnl_gIOdhw16o16i,
1605 gOdhwi16o = dnnl_gOdhwi16o,
1606 gOdhwI16o2i = dnnl_gOdhwI16o2i,
1607 gOdhwi4o = dnnl_gOdhwi4o,
1608 gOdhwi8o = dnnl_gOdhwi8o,
1609 gOIdhw16i16o = dnnl_gOIdhw16i16o,
1610 gOIdhw16o16i = dnnl_gOIdhw16o16i,
1611 gOidhw16o = dnnl_gOidhw16o,
1612 gOIdhw4i4o = dnnl_gOIdhw4i4o,
1613 gOIdhw4o4i = dnnl_gOIdhw4o4i,
1614 gOidhw4o = dnnl_gOidhw4o,
1615 gOIdhw8i16o2i = dnnl_gOIdhw8i16o2i,
1616 gOIdhw4i16o4i = dnnl_gOIdhw4i16o4i,
1617 gOIdhw2i8o4i = dnnl_gOIdhw2i8o4i,
1618 gOIdhw8i8o = dnnl_gOIdhw8i8o,
1619 gOIdhw8o8i = dnnl_gOIdhw8o8i,
1649 validate_dims(
dims);
1655 "could not construct a memory descriptor using a " 1676 validate_dims(
dims);
1677 if (!strides.empty()) validate_dims(strides, (
int)
dims.size());
1680 strides.empty() ? nullptr : &strides[0]);
1683 "could not construct a memory descriptor using " 1704 const memory::dims &offsets,
bool allow_empty =
false)
const {
1706 validate_dims(offsets, data.
ndims);
1709 &sub_md, &data,
dims.data(), offsets.data());
1712 return desc(sub_md);
1763 &out_md, &data, (
int)
dims.size(),
dims.data());
1766 status,
"could not reshape a memory descriptor");
1767 return desc(out_md);
1807 bool allow_empty =
false)
const {
1808 validate_dims(permutation, data.
ndims);
1811 &out_md, &data, permutation.data());
1814 "could not permute axes of a memory descriptor");
1815 return desc(out_md);
1887 "could not create a memory object");
1904 "could not get a memory descriptor from a memory object");
1905 return desc(*cdesc);
1912 "could not get an engine from a memory object");
1913 return engine(c_engine,
true);
1922 "could not get a native handle from a memory object");
1954 "could not set native handle of a memory object");
1976 template <
typename T =
void>
1980 "could not map memory object data");
1981 return static_cast<T *
>(mapped_ptr);
1997 "could not unmap memory object data");
2000 #if DNNL_GPU_RUNTIME == DNNL_RUNTIME_OCL 2001 cl_mem get_ocl_mem_object()
const {
2005 "could not get OpenCL buffer object from a memory object");
2018 "could not set OpenCL buffer object from a memory object");
2101 "post-ops index is out of range");
2130 "could not append a sum post-op");
2139 "could not get parameters of a sum post-op");
2161 "could not append an elementwise post-op");
2172 float &alpha,
float &beta)
const {
2175 get(), index, &scale, &c_alg, &alpha, &beta),
2176 "could not get parameters of an elementwise post-op");
2210 int mask,
const std::vector<float> &scales) {
2213 memory::convert_to_c(weights_data_type),
2214 memory::convert_to_c(bias_data_type),
2215 memory::convert_to_c(dst_data_type),
2216 scales.size(), mask, &scales[0]),
2217 "could not append depthwise post-op");
2236 int &mask, std::vector<float> &scales)
const {
2243 const float *c_scales;
2245 &c_weights_data_type, &c_bias_data_type,
2246 &c_dst_data_type, &count, &c_mask, &c_scales),
2247 "could not get parameters of depthwise post-op");
2252 scales.resize(count);
2256 scales[c] = c_scales[c];
2295 int mask,
const std::vector<float> &scales) {
2298 memory::convert_to_c(weights_data_type),
2299 memory::convert_to_c(bias_data_type),
2300 memory::convert_to_c(dst_data_type),
2301 scales.size(), mask, &scales[0]),
2302 "could not append depthwise post-op");
2321 int &mask, std::vector<float> &scales)
const {
2328 const float *c_scales;
2330 &c_weights_data_type, &c_bias_data_type,
2331 &c_dst_data_type, &count, &c_mask, &c_scales),
2332 "could not get parameters of depthwise post-op");
2337 scales.resize(count);
2341 scales[c] = c_scales[c];
2365 "could not create primitive attribute");
2382 "could not get primitive scratchpad mode attribute");
2392 "could not set primitive scratchpad mode attribute");
2407 const float *c_scales;
2409 get(), &count, &c_mask, &c_scales),
2410 "could not get primitive output scales attribute");
2411 scales.resize(count);
2415 scales[c] = c_scales[c];
2463 get(), (
dnnl_dim_t)scales.size(), mask, scales.data()),
2464 "could not set primitive output scales attribute");
2478 void get_scales(
int arg,
int &mask, std::vector<float> &scales)
const {
2481 const float *c_scales;
2483 get(), arg, &count, &c_mask, &c_scales),
2484 "could not get scales");
2485 scales.resize(count);
2489 scales[c] = c_scales[c];
2508 void set_scales(
int arg,
int mask,
const std::vector<float> &scales) {
2511 (
dnnl_dim_t)scales.size(), mask, scales.data()),
2512 "could not set scales");
2526 int arg,
int &mask, std::vector<int32_t> &zero_points)
const {
2529 const int32_t *c_zero_points;
2531 get(), arg, &count, &c_mask, &c_zero_points),
2532 "could not get primitive zero points attribute");
2533 zero_points.resize(count);
2537 zero_points[c] = c_zero_points[c];
2561 int arg,
int mask,
const std::vector<int32_t> &zero_points) {
2564 zero_points.data()),
2565 "could not set primitive zero points attribute");
2575 "could not get primitive post-ops attribute");
2576 result.
reset(const_cast<dnnl_post_ops_t>(c_result),
true);
2590 "could not set primitive post-ops attribute");
2629 "could not get primitive RNN data quantization parameters " 2661 (
int)scales.size(), mask, scales.data()),
2662 "could not get primitive RNN weights quantization parameters " 2689 "could not retrieve implementation info string from a " 2690 "primitive descriptor");
2723 if (!std::any_of(valid_q.cbegin(), valid_q.cend(),
2724 [=](
query q) {
return what == q; }))
2726 "memory descriptor query is invalid");
2850 "could not retrieve scratchpad engine from a primitive " 2852 return engine(c_engine,
true);
2860 "could not get attributes from a primitive descriptor");
2863 "could not clone primitive attributes");
2873 "could not get primitive kind from a primitive descriptor");
2884 "could not clone a primitive descriptor");
2937 if (pd ==
nullptr)
return;
2950 rc,
"could not get primitive kind from a primitive descriptor");
2951 if (pd_kind != c_prim_kind)
2953 "primitive descriptor operation kind mismatch");
2963 "could not get propagation kind from the primitive " 2969 && (pd_prop_kind == c_prop_kind1
2970 || pd_prop_kind == c_prop_kind2))) {
2977 "primitive descriptor propagation kind mismatch");
3026 "could not create a primitive descriptor for a reorder " 3047 "could not create a primitive descriptor for a reorder " 3121 const std::vector<memory::desc> &mems) {
3122 std::vector<dnnl_memory_desc_t> c_mems;
3123 c_mems.reserve(mems.size());
3124 for (
const auto &s : mems)
3125 c_mems.push_back(s.data);
3159 const std::vector<memory::desc> &srcs,
const engine &
engine,
3166 (
int)c_srcs.size(), concat_dimension, c_srcs.data(),
3168 "could not create a primitive descriptor for a concat " 3186 const std::vector<memory::desc> &srcs,
const engine &
engine,
3193 (
int)c_api_srcs.size(), concat_dimension,
3194 c_api_srcs.data(), attr.get(),
engine.
get()),
3195 "could not create a primitive descriptor for a concat " 3259 const std::vector<float> &scales,
3260 const std::vector<memory::desc> &srcs,
const engine &
engine,
3262 validate_container_size(scales,
3263 "counts of scales and sources are not equal",
3264 (
int)srcs.size(), (int)srcs.size());
3271 (
int)c_api_srcs.size(), scales.data(),
3272 c_api_srcs.data(), attr.get(),
engine.
get()),
3273 "could not create a primitive descriptor for a sum " 3289 const std::vector<memory::desc> &srcs,
const engine &
engine,
3291 validate_container_size(scales,
3292 "counts of scales and sources are not equal",
3293 (
int)srcs.size(), (int)srcs.size());
3299 (
int)c_api_srcs.size(), scales.data(),
3300 c_api_srcs.data(), attr.get(),
engine.
get()),
3301 "could not create a primitive descriptor for a sum " 3364 bool allow_empty =
false)
3365 : allow_empty_(allow_empty) {
3368 desc, attr ? attr->
get() :
nullptr,
engine.
get(), hint_fwd_pd);
3371 status,
"could not create a primitive descriptor iterator");
3372 pd_iterator.reset(iterator);
3385 status,
"could not advance a primitive descriptor iterator");
3391 bool allow_empty_ =
false;
3395 pd_iterator.
get(allow_empty_));
3398 "could not fetch a primitive descriptor from a primitive " 3399 "descriptor iterator");
3467 &strides[0], &padding_l[0], &padding_r[0]),
3468 "could not create a descriptor for a convolution forward " 3469 "propagation primitive");
3512 &weights_desc.
data,
nullptr, &dst_desc.
data,
3513 &strides[0], &padding_l[0], &padding_r[0]),
3514 "could not create a descriptor for a convolution forward " 3515 "propagation primitive");
3564 &weights_desc.
data, &bias_desc.
data,
3565 &dst_desc.
data, &strides[0], &dilates[0],
3566 &padding_l[0], &padding_r[0]),
3567 "could not create a descriptor for a dilated convolution " 3568 "forward propagation primitive");
3614 &weights_desc.
data,
nullptr,
3615 &dst_desc.
data, &strides[0], &dilates[0],
3616 &padding_l[0], &padding_r[0]),
3617 "could not create a descriptor for a dilated convolution " 3618 "forward propagation primitive");
3638 bool allow_empty =
false)
3640 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
3656 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
3737 &weights_desc.
data, &diff_dst_desc.
data,
3738 &strides[0], &padding_l[0], &padding_r[0]),
3739 "could not create a descriptor for a convolution backward " 3740 "propagation primitive");
3783 &weights_desc.
data, &diff_dst_desc.
data,
3784 &strides[0], &dilates[0], &padding_l[0],
3786 "could not create a descriptor for a dilated convolution " 3787 "backward propagation primitive");
3811 bool allow_empty =
false)
3813 hint_fwd_pd.
get(), allow_empty) {}
3832 bool allow_empty =
false)
3911 &diff_weights_desc.
data, &diff_bias_desc.
data,
3912 &diff_dst_desc.
data, &strides[0], &padding_l[0],
3914 "could not create a descriptor for a convolution weights " 3915 "update primitive");
3953 &diff_weights_desc.
data,
nullptr,
3954 &diff_dst_desc.
data, &strides[0],
3955 &padding_l[0], &padding_r[0]),
3956 "could not create a descriptor for a convolution weights " 3957 "update primitive");
4004 &diff_weights_desc.
data, &diff_bias_desc.
data,
4005 &diff_dst_desc.
data, &strides[0], &dilates[0],
4006 &padding_l[0], &padding_r[0]),
4007 "could not create a descriptor for a dilated convolution " 4008 "weights gradient primitive");
4051 &diff_weights_desc.
data,
nullptr,
4052 &diff_dst_desc.
data, &strides[0], &dilates[0],
4053 &padding_l[0], &padding_r[0]),
4054 "could not create a descriptor for a dilated convolution " 4055 "weights gradient primitive");
4078 bool allow_empty =
false)
4080 hint_fwd_pd.
get(), allow_empty) {}
4098 bool allow_empty =
false)
4201 &strides[0], &padding_l[0], &padding_r[0]),
4202 "could not create a descriptor for a deconvolution forward " 4203 "propagation primitive");
4245 &weights_desc.
data,
nullptr, &dst_desc.
data,
4246 &strides[0], &padding_l[0], &padding_r[0]),
4247 "could not create a descriptor for a deconvolution forward " 4248 "propagation primitive");
4296 &weights_desc.
data, &bias_desc.
data,
4297 &dst_desc.
data, &strides[0], &dilates[0],
4298 &padding_l[0], &padding_r[0]),
4299 "could not create a descriptor for a dilated deconvolution " 4300 "forward propagation primitive");
4345 &weights_desc.
data,
nullptr,
4346 &dst_desc.
data, &strides[0], &dilates[0],
4347 &padding_l[0], &padding_r[0]),
4348 "could not create a descriptor for a dilated deconvolution " 4349 "forward propagation primitive");
4369 bool allow_empty =
false)
4371 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
4387 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
4463 &weights_desc.
data, &diff_dst_desc.
data,
4464 &strides[0], &padding_l[0], &padding_r[0]),
4465 "could not create a descriptor for a deconvolution " 4466 "backward propagation primitive");
4508 &weights_desc.
data, &diff_dst_desc.
data,
4509 &strides[0], &dilates[0], &padding_l[0],
4511 "could not create a descriptor for a dilated deconvolution " 4512 "backward propagation primitive");
4536 bool allow_empty =
false)
4538 hint_fwd_pd.
get(), allow_empty) {}
4557 bool allow_empty =
false)
4635 &diff_weights_desc.
data, &diff_bias_desc.
data,
4636 &diff_dst_desc.
data, &strides[0], &padding_l[0],
4638 "could not create a descriptor for a deconvolution weights " 4639 "update primitive");
4676 &src_desc.
data, &diff_weights_desc.
data,
4677 nullptr, &diff_dst_desc.
data, &strides[0],
4678 &padding_l[0], &padding_r[0]),
4679 "could not create a descriptor for a deconvolution weights " 4680 "update primitive");
4726 &diff_weights_desc.
data, &diff_bias_desc.
data,
4727 &diff_dst_desc.
data, &strides[0], &dilates[0],
4728 &padding_l[0], &padding_r[0]),
4729 "could not create a descriptor for a dilated deconvolution " 4730 "weights gradient primitive");
4772 &diff_weights_desc.
data,
nullptr,
4773 &diff_dst_desc.
data, &strides[0], &dilates[0],
4774 &padding_l[0], &padding_r[0]),
4775 "could not create a descriptor for a dilated deconvolution " 4776 "weights gradient primitive");
4800 bool allow_empty =
false)
4802 hint_fwd_pd.
get(), allow_empty) {}
4821 bool allow_empty =
false)
4904 float alpha,
float beta,
float k = 1.f) {
4908 local_size, alpha, beta, k),
4909 "could not create a descriptor for a lrn forward " 4910 "propagation primitive");
4929 bool allow_empty =
false)
4931 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
4946 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
5009 float alpha,
float beta,
float k = 1.f) {
5012 &diff_data_desc.
data, &data_desc.
data, local_size,
5014 "could not create a descriptor for a lrn backward " 5015 "propagation primitive");
5038 bool allow_empty =
false)
5040 hint_fwd_pd.
get(), allow_empty) {}
5058 bool allow_empty =
false)
5147 &dst_desc.
data, &strides[0], &kernel[0],
5148 &padding_l[0], &padding_r[0]),
5149 "could not create a descriptor for a pooling forward " 5150 "propagation primitive");
5169 bool allow_empty =
false)
5171 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
5186 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
5260 &diff_dst_desc.
data, &strides[0], &kernel[0],
5261 &padding_l[0], &padding_r[0]),
5262 "could not create a descriptor for a pooling backward " 5263 "propagation primitive");
5286 bool allow_empty =
false)
5288 hint_fwd_pd.
get(), allow_empty) {}
5306 bool allow_empty =
false)
5392 &data_desc.
data, alpha, beta),
5393 "could not create a descriptor for an eltwise forward " 5394 "propagation primitive");
5414 bool allow_empty =
false)
5416 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
5432 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
5491 &data_desc.
data, alpha, beta),
5492 "could not create a descriptor for an eltwise backward " 5493 "propagation primitive");
5517 bool allow_empty =
false)
5519 hint_fwd_pd.
get(), allow_empty) {}
5538 bool allow_empty =
false)
5608 &data_desc.
data, softmax_axis),
5609 "could not create a descriptor for a softmax forward " 5610 "propagation primitive");
5630 bool allow_empty =
false)
5632 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
5648 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
5704 &data_desc.
data, softmax_axis),
5705 "could not create a descriptor for a softmax backward " 5706 "propagation primitive");
5730 bool allow_empty =
false)
5732 hint_fwd_pd.
get(), allow_empty) {}
5751 bool allow_empty =
false)
5818 int logsoftmax_axis) {
5821 &data_desc.
data, logsoftmax_axis),
5822 "could not create a descriptor for a logsoftmax forward " 5823 "propagation primitive");
5843 bool allow_empty =
false)
5845 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
5861 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
5918 int logsoftmax_axis) {
5920 &diff_data_desc.
data, &data_desc.
data,
5922 "could not create a descriptor for a logsoftmax backward " 5923 "propagation primitive");
5947 bool allow_empty =
false)
5949 hint_fwd_pd.
get(), allow_empty) {}
5968 bool allow_empty =
false)
6082 "could not create a descriptor for a batch normalization " 6083 "forward propagation primitive");
6104 bool allow_empty =
false)
6106 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
6122 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
6167 "could not retrieve a descriptor from a primitive " 6168 "descriptor for batch normalization forward propagation " 6229 "could not create a descriptor for a batch normalization " 6230 "backward propagation primitive");
6255 bool allow_empty =
false)
6257 hint_fwd_pd.
get(), allow_empty) {}
6276 bool allow_empty =
false)
6404 "could not create a descriptor for a layer normalization " 6405 "forward propagation primitive");
6447 "could not create a descriptor for a layer normalization " 6448 "forward propagation primitive");
6469 bool allow_empty =
false)
6471 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
6487 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
6530 "could not retrieve a descriptor from a primitive " 6531 "descriptor for layer normalization forward propagation " 6589 &data_desc.
data, &stat_desc.
data, epsilon,
6591 "could not create a descriptor for a batch normalization " 6592 "backward propagation primitive");
6628 &diff_data_desc.
data, &data_desc.
data,
6630 "could not create a descriptor for a batch normalization " 6631 "backward propagation primitive");
6656 bool allow_empty =
false)
6658 hint_fwd_pd.
get(), allow_empty) {}
6677 bool allow_empty =
false)
6777 &src_desc.
data, &weights_desc.
data,
6779 "could not create a descriptor for an inner product " 6780 "forward propagation primitive");
6809 &weights_desc.
data,
nullptr, &dst_desc.
data),
6810 "could not create a descriptor for an inner product " 6811 "forward propagation primitive");
6831 bool allow_empty =
false)
6833 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
6849 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
6911 &diff_src_desc.
data, &weights_desc.
data,
6912 &diff_dst_desc.
data),
6913 "could not create a descriptor for an inner product " 6914 "backward propagation primitive");
6939 bool allow_empty =
false)
6941 hint_fwd_pd.
get(), allow_empty) {}
6960 bool allow_empty =
false)
7024 &src_desc.
data, &diff_weights_desc.
data,
7025 &diff_bias_desc.
data, &diff_dst_desc.
data),
7026 "could not create a descriptor for an inner product " 7027 "weights gradient primitive");
7052 &src_desc.
data, &diff_weights_desc.
data,
nullptr,
7053 &diff_dst_desc.
data),
7054 "could not create a descriptor for an inner product " 7055 "weights gradient primitive");
7079 bool allow_empty =
false)
7081 hint_fwd_pd.
get(), allow_empty) {}
7100 bool allow_empty =
false)
7152 using primitive_desc::primitive_desc;
7323 "could not retrieve a descriptor from a primitive descriptor " 7324 "for an RNN primitive");
7331 && (
rnn_d->prop_kind == c_prop_kind1
7332 ||
rnn_d->prop_kind == c_prop_kind2)
7333 &&
rnn_d->cell_kind == c_cell_kind;
7337 "mismatch between expected and provided descriptors for an " 7412 float beta = 0.0f) {
7418 &src_iter_desc.
data, &weights_layer_desc.
data,
7419 &weights_iter_desc.
data, &bias_desc.
data,
7420 &dst_layer_desc.
data, &dst_iter_desc.
data,
7422 "could not create a descriptor for a vanilla RNN forward " 7423 "propagation primitive");
7443 bool allow_empty =
false)
7445 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
7461 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
7615 float beta = 0.0f) {
7621 &src_iter_desc.
data, &weights_layer_desc.
data,
7622 &weights_iter_desc.
data, &bias_desc.
data,
7623 &dst_layer_desc.
data, &dst_iter_desc.
data,
7624 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
7625 &diff_weights_layer_desc.
data,
7626 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
7627 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
7629 "could not create a descriptor for a vanilla RNN backward " 7630 "propagation primitive");
7654 bool allow_empty =
false)
7656 hint_fwd_pd.
get(), allow_empty) {}
7675 bool allow_empty =
false)
7677 hint_fwd_pd.
get(), allow_empty) {}
7851 &src_iter_desc.
data, &src_iter_c_desc.
data,
7852 &weights_layer_desc.
data, &weights_iter_desc.
data,
7853 &weights_peephole_desc.
data, &bias_desc.
data,
7854 &dst_layer_desc.
data, &dst_iter_desc.
data,
7856 "could not create a descriptor for an LSTM forward " 7857 "propagation primitive");
7926 &src_iter_desc.
data, &src_iter_c_desc.
data,
7927 &weights_layer_desc.
data, &weights_iter_desc.
data,
7928 &bias_desc.
data, &dst_layer_desc.
data,
7929 &dst_iter_desc.
data, &dst_iter_c_desc.
data,
7931 "could not create a descriptor for an LSTM forward " 7932 "propagation primitive");
7951 bool allow_empty =
false)
7953 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
7968 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
8172 &src_iter_desc.
data, &src_iter_c_desc.
data,
8173 &weights_layer_desc.
data, &weights_iter_desc.
data,
8174 &weights_peephole_desc.
data, &bias_desc.
data,
8175 &dst_layer_desc.
data, &dst_iter_desc.
data,
8176 &dst_iter_c_desc.
data, &diff_src_layer_desc.
data,
8177 &diff_src_iter_desc.
data,
8178 &diff_src_iter_c_desc.
data,
8179 &diff_weights_layer_desc.
data,
8180 &diff_weights_iter_desc.
data,
8181 &diff_weights_peephole_desc.
data,
8182 &diff_bias_desc.
data, &diff_dst_layer_desc.
data,
8183 &diff_dst_iter_desc.
data,
8184 &diff_dst_iter_c_desc.
data,
8186 "could not create a descriptor for an LSTM backward " 8187 "propagation primitive");
8296 &src_iter_desc.
data, &src_iter_c_desc.
data,
8297 &weights_layer_desc.
data, &weights_iter_desc.
data,
8298 &bias_desc.
data, &dst_layer_desc.
data,
8299 &dst_iter_desc.
data, &dst_iter_c_desc.
data,
8300 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
8301 &diff_src_iter_c_desc.
data,
8302 &diff_weights_layer_desc.
data,
8303 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
8304 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
8305 &diff_dst_iter_c_desc.
data,
8307 "could not create a descriptor for an LSTM backward " 8308 "propagation primitive");
8331 bool allow_empty =
false)
8333 hint_fwd_pd.
get(), allow_empty) {}
8351 bool allow_empty =
false)
8353 hint_fwd_pd.
get(), allow_empty) {}
8538 &src_iter_desc.
data, &weights_layer_desc.
data,
8539 &weights_iter_desc.
data, &bias_desc.
data,
8540 &dst_layer_desc.
data, &dst_iter_desc.
data,
8542 "could not create a descriptor for a GRU forward " 8543 "propagation primitive");
8562 bool allow_empty =
false)
8564 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
8579 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
8728 &src_iter_desc.
data, &weights_layer_desc.
data,
8729 &weights_iter_desc.
data, &bias_desc.
data,
8730 &dst_layer_desc.
data, &dst_iter_desc.
data,
8731 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
8732 &diff_weights_layer_desc.
data,
8733 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
8734 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
8736 "could not create a descriptor for a GRU backward " 8737 "propagation primitive");
8760 bool allow_empty =
false)
8762 hint_fwd_pd.
get(), allow_empty) {}
8780 bool allow_empty =
false)
8782 hint_fwd_pd.
get(), allow_empty) {}
8937 &src_iter_desc.
data, &weights_layer_desc.
data,
8938 &weights_iter_desc.
data, &bias_desc.
data,
8939 &dst_layer_desc.
data, &dst_iter_desc.
data,
8941 "could not create a descriptor for an LBR GRU forward " 8942 "propagation primitive");
8962 bool allow_empty =
false)
8964 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
8980 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
9130 &src_iter_desc.
data, &weights_layer_desc.
data,
9131 &weights_iter_desc.
data, &bias_desc.
data,
9132 &dst_layer_desc.
data, &dst_iter_desc.
data,
9133 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
9134 &diff_weights_layer_desc.
data,
9135 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
9136 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
9138 "could not create a descriptor for an LBR GRU backward " 9139 "propagation primitive");
9163 bool allow_empty =
false)
9165 hint_fwd_pd.
get(), allow_empty) {}
9184 bool allow_empty =
false)
9186 hint_fwd_pd.
get(), allow_empty) {}
9312 &data_desc.
data, axis, group_size),
9313 "could not create a descriptor for a shuffle forward " 9314 "propagation primitive");
9336 bool allow_empty =
false)
9338 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
9389 &diff_data_desc.
data, axis, group_size),
9390 "could not create a descriptor for a shuffle backward " 9391 "propagation primitive");
9417 bool allow_empty =
false)
9486 "could not create a descriptor for a binary operation " 9506 bool allow_empty =
false)
9508 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
9523 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
9588 &weights_desc.
data,
nullptr, &dst_desc.
data),
9589 "could not create a descriptor for a matmul primitive");
9609 &weights_desc.
data, &bias_desc.
data,
9611 "could not create a descriptor for a matmul primitive");
9629 bool allow_empty =
false)
9631 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
9645 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
9724 "could not create a resampling forward descriptor");
9742 const std::vector<float> &factors,
9748 &src_desc.
data,
nullptr),
9749 "could not create a resampling forward descriptor");
9775 const std::vector<float> &factors,
const memory::desc &src_desc,
9777 if (!factors.empty())
9783 "could not create a resampling forward descriptor");
9803 bool allow_empty =
false)
9805 &
desc.data, nullptr,
engine, nullptr, allow_empty) {}
9821 &
desc.data, &attr,
engine, nullptr, allow_empty) {}
9874 &diff_src_desc.
data, &diff_dst_desc.
data),
9875 "could not create a resampling backward data descriptor");
9896 if (!factors.empty())
9900 &diff_src_desc.
data, &diff_dst_desc.
data),
9901 "could not create a resampling backward data descriptor");
9925 bool allow_empty =
false)
9927 hint_fwd_pd.
get(), allow_empty) {}
9946 bool allow_empty =
false)
10056 return static_cast<status>(
10074 transa, transb, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc));
10081 float beta, int32_t *C,
dnnl_dim_t ldc,
const int32_t *co) {
10083 K, alpha, A, lda, ao, B, ldb, bo, beta, C, ldc, co));
10090 float beta, int32_t *C,
dnnl_dim_t ldc,
const int32_t *co) {
10092 K, alpha, A, lda, ao, B, ldb, bo, beta, C, ldc, co));
10103 "could not create a primitive");
10109 inline void primitive::execute(
10110 stream &stream,
const std::unordered_map<int, memory> &args)
const {
10111 std::vector<dnnl_exec_arg_t> c_args;
10112 c_args.reserve(args.size());
10113 for (
const auto &a : args)
10114 c_args.push_back({a.first, a.second.get(
true)});
10117 (int)c_args.size(), c_args.data()),
10118 "could not execute a primitive");
10122 #undef DNNL_DEFINE_BITMASK_OPS Layer normalization forward propagation primitive.
Definition: dnnl.hpp:6358
dnnl_status_t DNNL_API dnnl_primitive_attr_create(dnnl_primitive_attr_t *attr)
Creates an empty (default) primitive attributes with all the parameters set to their default values...
desc(algorithm algorithm, 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)
Constructs a descriptor for a convolution backward propagation primitive.
Definition: dnnl.hpp:3727
dnnl_status_t DNNL_API dnnl_post_ops_get_params_dw_k3s1p1(const_dnnl_post_ops_t post_ops, int index, dnnl_data_type_t *weights_data_type, dnnl_data_type_t *bias_data_type, dnnl_data_type_t *dst_data_type, dnnl_dim_t *count, int *mask, const float **scales)
Returns the parameters of an depthwise post-op with stride 1.
A layer normalization primitive.
Definition: dnnl_types.h:693
cl_device_id get_ocl_device() const
Returns the OpenCL device associated with the engine.
Definition: dnnl.hpp:928
dnnl_status_t DNNL_API dnnl_primitive_attr_set_rnn_data_qparams(dnnl_primitive_attr_t attr, const float scale, const float shift)
Set quantization scale and shift parameters for RNN data tensors.
dnnl_status_t DNNL_API dnnl_post_ops_get_params_dw_k3s2p1(const_dnnl_post_ops_t post_ops, int index, dnnl_data_type_t *weights_data_type, dnnl_data_type_t *bias_data_type, dnnl_data_type_t *dst_data_type, dnnl_dim_t *count, int *mask, const float **scales)
Returns the parameters of an depthwise post-op with stride 2.
deconvolution_forward(const primitive_desc &pd)
Constructs a deconvolution forward propagation primitive.
Definition: dnnl.hpp:4419
primitive_desc(const desc &desc, const engine &engine, const resampling_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a resampling backward propagation primitive.
Definition: dnnl.hpp:9923
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for an LSTM forward propagation primitive.
Definition: dnnl.hpp:7965
destination grad. memory desc
Definition: dnnl_types.h:1991
void * get_data_handle() const
Returns the underlying memory buffer.
Definition: dnnl.hpp:1919
An element-wise primitive.
Definition: dnnl_types.h:683
flags
Stream flags. Can be combined using the bitwise OR operator.
Definition: dnnl.hpp:985
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:4839
Primitive descriptor for a shuffle forward propagation primitive.
Definition: dnnl.hpp:9319
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 a descriptor for LSTM forward propagation primitive.
lrn_backward(const primitive_desc &pd)
Constructs an LRN backward propagation primitive.
Definition: dnnl.hpp:5088
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for reorder primitive from a C API primitive descriptor which must ...
Definition: dnnl.hpp:3056
prop_kind
Propagation kind.
Definition: dnnl.hpp:436
primitive_desc(const desc &desc, const engine &engine, const gru_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a GRU backward propagation primitive.
Definition: dnnl.hpp:8758
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:7496
memory::desc diff_dst_desc(int idx) const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:2774
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:9655
memory::desc src_iter_c_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8374
dnnl_status_t DNNL_API dnnl_gemm_s8s8s32(char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const int8_t *A, dnnl_dim_t lda, int8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co)
Performs integer matrix-matrix multiply on 8-bit signed matrix A, 8-bit signed matrix B...
execution engine
Definition: dnnl_types.h:1942
primitive_desc(const desc &desc, const engine &engine, const logsoftmax_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a logsoftmax backward propagation primitive.
Definition: dnnl.hpp:5945
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a pooling forward propagation primitive.
Definition: dnnl.hpp:5168
A batch normalization primitive.
Definition: dnnl_types.h:691
sum()=default
Default constructor. Produces an empty object.
desc(const memory::desc &diff_src_desc, const memory::desc &weights_desc, const memory::desc &diff_dst_desc)
Constructs a descriptor for an inner product backward propagation primitive.
Definition: dnnl.hpp:6907
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:5769
primitive_desc()=default
Default constructor. Produces an empty object.
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 attributes of a primitive descriptor.
Deconvolution forward propagation primitive.
Definition: dnnl.hpp:4152
Eltwise: bounded_relu.
Definition: dnnl_types.h:738
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:9007
primitive_desc(const desc &desc, const engine &engine, const convolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a convolution backward propagation primitive.
Definition: dnnl.hpp:3809
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:4960
Undefined memory format tag.
Definition: dnnl_types.h:169
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const lrn_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an LRN backward propagation primitive.
Definition: dnnl.hpp:5055
3D tensor blocked by 2nd dimension with block size 16
Definition: dnnl_types.h:210
shuffle_backward(const primitive_desc &pd)
Constructs a shuffle backward propagation primitive.
Definition: dnnl.hpp:9444
A tensor in a generic format described by the stride and blocking values in each dimension.
Definition: dnnl_types.h:89
memory::desc diff_dst_iter_desc() const
Returns diff destination iteration memory descriptor.
Definition: dnnl.hpp:8455
Primitive descriptor for a pooling forward propagation primitive.
Definition: dnnl.hpp:5155
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a convolution backward propagation primitive from a C API primi...
Definition: dnnl.hpp:3842
Vanilla RNN descriptor backward propagation primitive.
Definition: dnnl.hpp:7521
CPU engine.
Definition: dnnl_types.h:1599
inner_product_backward_data()=default
Default constructor. Produces an empty object.
primitive_desc()=default
Default constructor. Produces an empty object.
desc(prop_kind prop_kind, const memory::desc &data_desc, int axis, int group_size)
Constructs a descriptor for a shuffle forward propagation primitive.
Definition: dnnl.hpp:9308
Eltwise: ReLU (dst for backward)
Definition: dnnl_types.h:763
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:9355
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 descriptor for a convolution weights gradient primitive.
dnnl_status_t DNNL_API dnnl_gemm_u8s8s32(char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const uint8_t *A, dnnl_dim_t lda, uint8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co)
Performs integer matrix-matrix multiply on 8-bit unsigned matrix A, 8-bit signed matrix B...
#define DNNL_ARG_DIFF_WEIGHTS_ITER
A special mnemonic for diff of RNN weights applied to the recurrent input.
Definition: dnnl_types.h:1870
destination memory desc
Definition: dnnl_types.h:1990
Direct deconvolution.
Definition: dnnl_types.h:720
Elementwise: exponential linear unit (elu)
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &desc, const engine &engine, const shuffle_forward::primitive_desc &hint_fwd_pd, const primitive_attr &attr=primitive_attr(), bool allow_empty=false)
Constructs a primitive descriptor for a shuffle backward propagation primitive.
Definition: dnnl.hpp:9414
primitive_desc()=default
Default constructor. Produces an empty object.
A descriptor for an RNN operation.
Definition: dnnl_types.h:1439
The user manages the scratchpad allocation by querying and providing the scratchpad memory to primiti...
Definition: dnnl_types.h:1671
The operation failed due to an out-of-memory condition.
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:8384
layer normalization descriptor
Definition: dnnl_types.h:1975
gru_backward(const primitive_desc &pd)
Constructs a GRU backward propagation primitive.
Definition: dnnl.hpp:8870
memory::desc diff_weights_peephole_desc() const
Returns diff weights peephole memory descriptor.
Definition: dnnl.hpp:7268
Elementwise: erf-based gelu.
primitive_desc(const desc &desc, const engine &engine, const batch_normalization_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a batch normalization backward propagation primitive.
Definition: dnnl.hpp:6253
memory consumption – extra
Definition: dnnl_types.h:1949
Average pooling exclude padding, alias for dnnl::algorithm::pooling_avg_include_padding.
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:7190
status gemm_s8s8s32(char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const int8_t *A, dnnl_dim_t lda, int8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co)
Performs integer matrix-matrix multiply on 8-bit signed matrix A, 8-bit signed matrix B...
Definition: dnnl.hpp:10087
dnnl_primitive_kind_t
Kinds of primitives.
Definition: dnnl_types.h:667
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const deconvolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a deconvolution weights update primitive.
Definition: dnnl.hpp:4818
void get_params_dw_k3s1p1(int index, memory::data_type &weights_data_type, memory::data_type &bias_data_type, memory::data_type &dst_data_type, int &mask, std::vector< float > &scales) const
Returns the parameters of an depthwise post-op with stride 1.
Definition: dnnl.hpp:2234
Average pooling include padding.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a logsoftmax forward propagation primitive. ...
Definition: dnnl.hpp:5858
eltwise_forward()=default
Default constructor. Produces an empty object.
permuted 3D tensor
Definition: dnnl_types.h:193
Eltwise: linear.
Definition: dnnl_types.h:736
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a batch normalization backward propagation primitive from a C A...
Definition: dnnl.hpp:6286
desc(prop_kind prop_kind, const memory::desc &data_desc, int softmax_axis)
Constructs a descriptor for a softmax forward propagation primitive.
Definition: dnnl.hpp:5604
Primitive descriptor for a convolution backward propagation primitive.
Definition: dnnl.hpp:3792
softmax_backward(const primitive_desc &pd)
Constructs a softmax backward propagation primitive.
Definition: dnnl.hpp:5781
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:4963
Bidirectional execution of RNN primitive with concatenation of the results.
Primitive descriptor for a pooling backward propagation primitive.
Definition: dnnl.hpp:5268
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:8018
Elementwise: logistic (dst for backward)
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:6709
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:6981
memory(const desc &md, const engine &engine)
Constructs a memory object.
Definition: dnnl.hpp:1897
void set_scratchpad_mode(scratchpad_mode mode)
Sets scratchpad mode.
Definition: dnnl.hpp:2389
vanilla_rnn_backward()=default
Default constructor. Produces an empty object.
A resampling primitive.
Definition: dnnl_types.h:707
shuffle_forward(const primitive_desc &pd)
Constructs a shuffle forward propagation primitive.
Definition: dnnl.hpp:9364
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a batch normalization forward propagation primitive.
Definition: dnnl.hpp:6103
logsoftmax_backward(const primitive_desc &pd)
Constructs a logsoftmax backward propagation primitive.
Definition: dnnl.hpp:6002
An opaque structure to describe a primitive.
GRU cell with linear before reset.
Definition: dnnl_types.h:799
deconvolution_backward_weights(const primitive_desc &pd)
Constructs a deconvolution weights gradient primitive.
Definition: dnnl.hpp:4858
DNNL namespace.
Definition: dnnl.hpp:77
Descriptor for a convolution forward propagation primitive.
Definition: dnnl.hpp:3419
Any ISA (no restrictions)
Definition: dnnl_types.h:2079
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:6308
Undefined data type, used for empty memory descriptors.
Definition: dnnl_types.h:64
primitive_desc()=default
Default constructor. Produces an empty object.
status set_max_cpu_isa(cpu_isa isa)
Sets the maximal ISA DNNL can dispatch to on the CPU.
Definition: dnnl.hpp:10055
dnnl_status_t DNNL_API dnnl_lstm_backward_desc_init_v2(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 *weights_peephole_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_weights_peephole_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 a descriptor for an LSTM (with or without peephole) backward propagation primitive...
static engine query(const primitive_desc &pd)
Returns the engine of a primitive descriptor.
Definition: dnnl.hpp:942
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8371
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 descriptor using dimensions and strides.
primitive_desc()=default
Default constructor. Produces an empty object.
desc(const dnnl_memory_desc_t &data)
Constructs a memory descriptor from a C API data structure.
Definition: dnnl.hpp:1690
desc(prop_kind prop_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)
Constructs an LSTM descriptor for backward propagation using prop_kind, direction, and memory descriptors.
Definition: dnnl.hpp:8272
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:7695
memory::desc bias_desc() const
Returns the bias memory descriptor.
Definition: dnnl.hpp:3682
memory::desc diff_weights_layer_desc() const
Returns diff weights layer memory descriptor.
Definition: dnnl.hpp:7256
primitive_desc(const memory::desc &dst, const std::vector< float > &scales, const std::vector< memory::desc > &srcs, const engine &engine, const primitive_attr &attr=primitive_attr())
Constructs a primitive descriptor for a sum primitive.
Definition: dnnl.hpp:3258
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:9212
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 descriptor for a dilated convolution forward propagation primitive. ...
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:5449
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:9204
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 a descriptor for LRN backward propagation primitive.
Primitive descriptor for a convolution weights gradient primitive.
Definition: dnnl.hpp:4060
primitive_desc(const desc &desc, const engine &engine, const inner_product_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an inner product backward propagation primitive.
Definition: dnnl.hpp:6937
desc(algorithm algorithm, 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)
Constructs a descriptor for a dilated convolution weights gradient primitive with bias...
Definition: dnnl.hpp:3991
binary()=default
Default constructor. Produces an empty object.
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 descriptor for a layer normalization backward propagation primitive.
#define DNNL_ARG_WEIGHTS_LAYER
A special mnemonic for RNN weights applied to the layer input.
Definition: dnnl_types.h:1784
scratchpad memory desc
Definition: dnnl_types.h:1993
Elementwise: natural logarithm.
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_next(dnnl_primitive_desc_iterator_t iterator)
Advances the primitive descriptor iterator to point to the next available implementation.
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:8824
const void * const_dnnl_op_desc_t
A pointer to any of the operation descriptors (constant variant).
Definition: dnnl_types.h:1075
Intel(R) SSE4.1.
Definition: dnnl_types.h:2082
Eltwise: clip.
Definition: dnnl_types.h:757
inner_product_backward_data(const primitive_desc &pd)
Constructs an inner product backward propagation primitive.
Definition: dnnl.hpp:6990
Shuffle backward propagation primitive.
Definition: dnnl.hpp:9368
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a LBR GRU forward propagation primitive.
Definition: dnnl.hpp:8977
sum(const primitive_desc &pd)
Constructs a sum primitive.
Definition: dnnl.hpp:3325
An opaque structure for primitive descriptor attributes.
reorder destination engine
cl_context get_ocl_context() const
Returns the OpenCL context associated with the engine.
Definition: dnnl.hpp:919
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:9020
Deconvolution weights gradient primitive.
Definition: dnnl.hpp:4591
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a matmul primitive from a C API primitive descriptor that must ...
Definition: dnnl.hpp:9651
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:7123
memory::desc diff_src_layer_desc() const
Returns diff source layer memory descriptor.
Definition: dnnl.hpp:8415
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:9352
gru_forward()=default
Default constructor. Produces an empty object.
logsoftmax descriptor
Definition: dnnl_types.h:1980
Backward propagation (with respect to all parameters).
kind
Kinds of primitives supported by the library.
Definition: dnnl.hpp:278
permuted 4D tensor
Definition: dnnl_types.h:190
void get_output_scales(int &mask, std::vector< float > &scales) const
Returns output scaling factors correspondence mask and values.
Definition: dnnl.hpp:2404
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const softmax_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a softmax backward propagation primitive.
Definition: dnnl.hpp:5748
Use scale and shift parameters.
memory::desc diff_src_iter_desc() const
Returns diff source iteration memory descriptor.
Definition: dnnl.hpp:7244
desc(prop_kind prop_kind, algorithm algorithm, 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)
Constructs a descriptor for a deconvolution forward propagation primitive with bias.
Definition: dnnl.hpp:4188
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:7987
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:4404
Primitive iterator passed over last primitive descriptor.
Definition: dnnl_types.h:49
memory::desc diff_bias_desc() const
Returns diff bias memory descriptor.
Definition: dnnl.hpp:7277
primitive_desc(const desc &desc, const engine &engine, const lrn_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an LRN backward propagation primitive.
Definition: dnnl.hpp:5036
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 descriptor for a convolution backward propagation primitive.
#define DNNL_ARG_DST_LAYER
A special mnemonic for RNN output vector. An alias for DNNL_ARG_DST_0.
Definition: dnnl_types.h:1760
desc(prop_kind prop_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)
Constructs a descriptor for LBR GRU forward propagation primitive.
Definition: dnnl.hpp:8924
Local response normalization (LRN) forward propagation primitive.
Definition: dnnl.hpp:4873
memory::desc src_desc(int idx) const
Returns a source memory descriptor.
Definition: dnnl.hpp:2738
An opaque structure to describe a memory.
Base class for primitive descriptors for RNN primitives.
Definition: dnnl.hpp:7151
void reset(T t, bool weak=false)
Resets the handle wrapper objects to wrap a new C API handle.
Definition: dnnl.hpp:179
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a batch normalization forward propagation primitive.
Definition: dnnl.hpp:6119
Descriptor for an inner product backward propagation primitive.
Definition: dnnl.hpp:6887
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a shuffle backward propagation primitive from a C API primitive...
Definition: dnnl.hpp:9427
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for an inner product forward propagation primitive.
Definition: dnnl.hpp:6846
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:6706
Elementwise: hyperbolic tangent non-linearity (tanh) (dst for backward)
permuted 5D tensor
Definition: dnnl_types.h:191
dnnl_memory_desc_t data
The underlying C API data structure.
Definition: dnnl.hpp:1626
LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9038
Descriptor for a layer normalization forward propagation primitive.
Definition: dnnl.hpp:6360
dnnl_engine_kind_t
Kinds of engines.
Definition: dnnl_types.h:1595
desc(prop_kind prop_kind, const memory::desc &diff_data_desc, const memory::desc &data_desc, const memory::desc &stat_desc, float epsilon, normalization_flags flags)
Constructs a descriptor for layer normalization backward propagation primitive.
Definition: dnnl.hpp:6583
Eltwise: square root (dst for backward)
Definition: dnnl_types.h:769
non-standard 16-bit (bfloat16 w/ 7 bit mantissa) floating point.
Definition: dnnl_types.h:68
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:5559
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:7483
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:3670
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a softmax forward propagation primitive from a C API primitive ...
Definition: dnnl.hpp:5656
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:8619
batch_normalization_backward()=default
Default constructor. Produces an empty object.
Intel(R) Advanced Vector Extensions 512 with Intel(R) DL Boost Support for Intel(R) Xeon(R) Processor...
lbr_gru_forward()=default
Default constructor. Produces an empty object.
Primitive descriptor for a concat primitive.
Definition: dnnl.hpp:3133
memory::dims dims() const
Returns dimensions of the memory descriptor.
Definition: dnnl.hpp:1822
#define DNNL_ARG_SRC_LAYER
A special mnemonic for RNN input vector.
Definition: dnnl_types.h:1734
Elementwise: square root (dst for backward)
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a resampling forward propagation primitive. ...
Definition: dnnl.hpp:9818
void execute(stream &stream, const std::unordered_map< int, memory > &args) const
Executes computations specified by the primitive in a specified stream.
desc(const memory::desc &diff_data_desc, const memory::desc &data_desc, int softmax_axis)
Constructs a descriptor for a softmax backward propagation primitive.
Definition: dnnl.hpp:5700
Undefined primitive.
Definition: dnnl_types.h:669
Intel(R) Advanced Vector Extensions 512 subset for Intel(R) Xeon Phi(TM) Processors x200 Series...
void set_post_ops(const post_ops ops)
Sets post-ops.
Definition: dnnl.hpp:2588
number of outputs expected
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a pooling forward propagation primitive.
Definition: dnnl.hpp:5183
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:7504
primitive::kind kind(int index) const
Returns the primitive kind of post-op at entry with a certain index.
Definition: dnnl.hpp:2099
Unidirectional execution of RNN primitive from left to right.
Definition: dnnl_types.h:1425
The library manages the scratchpad allocation according to the policy specified by the DNNL_ENABLE_CO...
Definition: dnnl_types.h:1666
memory::desc diff_src_layer_desc() const
Returns diff source layer memory descriptor.
Definition: dnnl.hpp:7236
Descriptor for an inner product weights gradient primitive.
Definition: dnnl.hpp:6996
dnnl_status_t DNNL_API dnnl_memory_destroy(dnnl_memory_t memory)
Destroys a memory object.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:5203
dnnl_status_t DNNL_API dnnl_memory_get_data_handle(const_dnnl_memory_t memory, void **handle)
Returns memory object's data handle.
3D tensor blocked by 2nd dimension with block size 4
Definition: dnnl_types.h:214
desc(const memory::desc &diff_data_desc, const memory::desc &data_desc, int logsoftmax_axis)
Constructs a descriptor for a logsoftmax backward propagation primitive.
Definition: dnnl.hpp:5917
memory::desc weights_peephole_desc() const
Returns weights peephole memory descriptor.
Definition: dnnl.hpp:7202
batch normalization descriptor
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:8593
3D CNN activations tensor blocked by channels with block size 8, an alias to dnnl_aBc8b ...
Definition: dnnl_types.h:487
Nearest Neighbor resampling method.
memory::desc diff_weights_iter_desc() const
Returns diff weights iteration memory descriptor.
Definition: dnnl.hpp:8435
Intel(R) Advanced Vector Extensions 512 subset for Intel(R) Xeon Phi(TM) Processors 7235...
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:5882
dnnl_dims_t dims
Dimensions in the following order:
Definition: dnnl_types.h:1020
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const lstm_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an LSTM backward propagation primitive.
Definition: dnnl.hpp:8348
primitive_desc()=default
Default constructor. Produces an empty object.
4D CNN activations tensor blocked by channels with block size 16, an alias to dnnl_aBcd16b ...
Definition: dnnl_types.h:472
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:9012
binary descriptor
Definition: dnnl_types.h:1979
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for an elementwise forward propagation primitive.
Definition: dnnl.hpp:5413
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:6866
Elementwise: square root.
primitive_desc()=default
Default constructor. Produces an empty object.
The operation was successful.
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:2818
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:9835
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:5990
Any ISA (no restrictions)
dnnl_status_t DNNL_API dnnl_primitive_attr_destroy(dnnl_primitive_attr_t attr)
Destroys primitive attributes.
#define DNNL_ARG_WEIGHTS_ITER
A special mnemonic for RNN weights applied to the recurrent input.
Definition: dnnl_types.h:1790
desc(algorithm algorithm, 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)
Constructs a descriptor for a deconvolution weights gradient primitive without bias.
Definition: dnnl.hpp:4667
Descriptor for a batch normalization backward propagation primitive.
Definition: dnnl.hpp:6188
memory::desc diff_weights_peephole_desc() const
Returns diff weights peephole memory descriptor.
Definition: dnnl.hpp:8440
primitive_desc(const_dnnl_op_desc_t desc, const primitive_attr *attr, const engine &engine, const_dnnl_primitive_desc_t hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor.
Definition: dnnl.hpp:3362
memory::desc diff_dst_iter_desc() const
Returns diff destination iteration memory descriptor.
Definition: dnnl.hpp:7754
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for an LRN forward propagation primitive.
Definition: dnnl.hpp:4943
memory::desc diff_weights_layer_desc() const
Returns diff weights layer memory descriptor.
Definition: dnnl.hpp:8430
A descriptor of a pooling operation.
Definition: dnnl_types.h:1244
status set_jit_profiling_jitdumpdir(const std::string &dir)
Sets JIT dump output path.
Definition: dnnl.hpp:10028
desc permute_axes(const std::vector< int > &permutation, bool allow_empty=false) const
Constructs a memory descriptor by permuting axes in an existing one.
Definition: dnnl.hpp:1806
plain 2D tensor
Definition: dnnl_types.h:178
kind get_kind() const
Returns the kind of the engine.
Definition: dnnl.hpp:909
A memory descriptor.
Definition: dnnl.hpp:1623
primitive_desc_base(dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind prop_kind)
Constructs a primitive descriptor base object from a clone of a C API primitive descriptor after veri...
Definition: dnnl.hpp:2916
permuted 5D tensor
Definition: dnnl_types.h:197
rnn_direction
A direction of RNN primitive execution.
Definition: dnnl.hpp:680
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:3676
destination gradient (diff) memory desc
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:8816
vanilla_rnn_forward()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const eltwise_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an elementwise backward propagation primitive.
Definition: dnnl.hpp:5535
Undefined memory format kind, used for empty memory descriptors.
Definition: dnnl_types.h:82
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const vanilla_rnn_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a vanilla RNN backward propagation primitive.
Definition: dnnl.hpp:7672
GRU cell with linear before reset.
memory::desc diff_dst_iter_desc() const
Returns diff destination iteration memory descriptor.
Definition: dnnl.hpp:8859
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 a descriptor for vanilla RNN backward propagation primitive.
desc(prop_kind prop_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)
Constructs a descriptor for LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9110
32-bit signed integer.
Definition: dnnl_types.h:72
Bidirectional execution of RNN primitive with summation of the results.
Definition: dnnl_types.h:1433
primitive_desc(const std::vector< float > &scales, const std::vector< memory::desc > &srcs, const engine &engine, const primitive_attr &attr=primitive_attr())
Constructs a primitive descriptor for a sum primitive.
Definition: dnnl.hpp:3288
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_kind, float *alpha, float *beta)
Returns the parameters of an elementwise post-up.
An inner product primitive.
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:8013
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:4836
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5879
Direct convolution.
Definition: dnnl_types.h:714
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:2794
memory::desc diff_weights_layer_desc() const
Returns diff weights layer memory descriptor.
Definition: dnnl.hpp:9243
Just a sentinel, not real memory format tag.
Definition: dnnl_types.h:353
Primitive descriptor for an LRN forward propagation primitive.
Definition: dnnl.hpp:4915
desc(const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_desc)
Constructs a descriptor for an inner product descriptor weights update primitive with bias...
Definition: dnnl.hpp:7018
Descriptor for an LSTM forward propagation primitive.
Definition: dnnl.hpp:7771
5D tensor blocked by 1st dimension with block size 8
Definition: dnnl_types.h:265
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:8821
An opaque structure to describe a primitive descriptor iterator.
eltwise_forward(const primitive_desc &pd)
Constructs an eltwise forward propagation primitive.
Definition: dnnl.hpp:5458
pooling descriptor
Definition: dnnl_types.h:1972
Convolution algorithm(either direct or Winograd) is chosen just in time.
Definition: dnnl_types.h:718
memory::desc diff_src_layer_desc() const
Returns diff source layer memory descriptor.
Definition: dnnl.hpp:9233
Elementwise: bounded_relu.
Logsoftmax backward propagation primitive.
Definition: dnnl.hpp:5895
An execution engine.
Definition: dnnl.hpp:837
matmul(const primitive_desc &pd)
Constructs a matmul primitive.
Definition: dnnl.hpp:9676
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for an inner product forward propagation primitive.
Definition: dnnl.hpp:6830
dnnl_status_t DNNL_API dnnl_memory_set_data_handle(dnnl_memory_t memory, void *handle)
Sets a memory object's data handle.
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.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:5987
GRU forward propagation primitive.
Definition: dnnl.hpp:8475
dnnl_status_t DNNL_API dnnl_memory_desc_permute_axes(dnnl_memory_desc_t *out_memory_desc, const dnnl_memory_desc_t *in_memory_desc, const int *permutation)
Initializes a memory descriptor by permuting axes in an existing one.
Primitive descriptor for a layer normalization forward propagation primitive.
Definition: dnnl.hpp:6454
desc(prop_kind prop_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)
Constructs a descriptor for a vanilla RNN backward propagation primitive.
Definition: dnnl.hpp:7599
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 a primitive descriptor for various pieces of information.
convolution_backward_data(const primitive_desc &pd)
Constructs a convolution backward propagation primitive.
Definition: dnnl.hpp:3862
dnnl_status_t DNNL_API dnnl_memory_unmap_data(const_dnnl_memory_t memory, void *mapped_ptr)
Unmaps a memory object and writes back any changes to the previously mapped buffer.
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:3072
const char * impl_info_str() const
Returns implementation name.
Definition: dnnl.hpp:2685
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:9207
void unmap_data(void *mapped_ptr) const
Unmaps the previously mapped data for the memory.
Definition: dnnl.hpp:1995
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:8611
Descriptor for an LRN backward propagation primitive.
Definition: dnnl.hpp:4981
Primitive descriptor for an inner product weights gradient primitive.
Definition: dnnl.hpp:7060
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:8622
layer_normalization_forward()=default
Default constructor. Produces an empty object.
dnnl_status_t DNNL_API dnnl_lstm_forward_desc_init_v2(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 *weights_peephole_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 a descriptor for an LSTM (with or without peephole) forward propagation primitive...
An element-wise primitive.
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 descriptor for GRU backward propagation primitive.
dnnl_status_t DNNL_API dnnl_deconvolution_backward_weights_desc_init(dnnl_deconvolution_desc_t *deconv_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 descriptor for a deconvolution weights gradient primitive.
memory desc of an execute argument
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:9002
Unidirectional execution of RNN primitive from right to left.
Definition: dnnl_types.h:1427
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.
A deconvolution primitive.
Definition: dnnl_types.h:681
Descriptor for an LRN forward propagation primitive.
Definition: dnnl.hpp:4875
A class that provides the destructor for a DNNL C API handle.
Definition: dnnl.hpp:123
lstm_backward()=default
Default constructor. Produces an empty object.
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:7115
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a convolution forward propagation primitive from a C API primit...
Definition: dnnl.hpp:3664
LSTM backward propagation primitive.
Definition: dnnl.hpp:8041
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:7178
dnnl_status_t DNNL_API dnnl_post_ops_append_eltwise(dnnl_post_ops_t post_ops, float scale, dnnl_alg_kind_t alg_kind, float alpha, float beta)
Appends an elementwise post-op.
5D tensor blocked by 2nd dimension with block size 8
Definition: dnnl_types.h:284
desc(prop_kind prop_kind, algorithm algorithm, 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)
Constructs a descriptor for a dilated convolution forward propagation primitive with bias...
Definition: dnnl.hpp:3552
8-bit unsigned integer.
Definition: dnnl_types.h:76
A descriptor of a matrix multiplication operation.
Definition: dnnl_types.h:1543
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:4116
memory::desc mean_desc() const
Returns memory descriptor for mean.
Definition: dnnl.hpp:6514
Alias for dnnl::rnn_direction::unidirectional_left2right.
memory::desc src_desc(int idx=0) const
Returns a source memory descriptor.
Definition: dnnl.hpp:3314
deconvolution_backward_data()=default
Default constructor. Produces an empty object.
permuted 6D tensor
Definition: dnnl_types.h:202
dnnl_status_t DNNL_API dnnl_primitive_attr_get_scales(dnnl_primitive_attr_t attr, int arg, dnnl_dim_t *count, int *mask, const float **scales)
Returns primitive attributes scaling factors correspondence mask and values for a given memory argume...
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:9220
dnnl_status_t DNNL_API dnnl_set_jit_profiling_flags(unsigned flags)
Sets library profiling flags.
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 scaling factors correspondence mask and values.
number of inputs expected
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:3847
memory::desc diff_bias_desc() const
Returns diff bias memory descriptor.
Definition: dnnl.hpp:7744
void execute(stream stream, memory &src, memory &dst) const
Executes the reorder primitive.
Definition: dnnl.hpp:3104
layer_normalization_forward(const primitive_desc &pd)
Constructs a layer normalization forward propagation primitive.
Definition: dnnl.hpp:6545
#define DNNL_ARG_DIFF_DST_ITER
A special mnemonic for gradient (diff) of RNN input recurrent hidden state vector.
Definition: dnnl_types.h:1846
dnnl_query_t
Primitive descriptor query specification.
Definition: dnnl_types.h:1939
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:6697
Intel(R) Advanced Vector Extensions.
Definition: dnnl_types.h:2085
Intel(R) Advanced Vector Extensions 512 subset for Intel(R) Xeon Phi(TM) Processors 7235...
Definition: dnnl_types.h:2096
Backward data propagation.
Definition: dnnl_types.h:658
Inner product forward propagation primitive.
Definition: dnnl.hpp:6745
Average pooling exclude padding.
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:5324
desc(prop_kind prop_kind, const memory::desc &data_desc, float epsilon, normalization_flags flags)
Constructs a descriptor for layer normalization forward propagation primitive.
Definition: dnnl.hpp:6441
A descriptor of a binary operation.
Definition: dnnl_types.h:1517
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 descriptor for GRU forward propagation primitive.
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:7480
source gradient memory desc
Definition: dnnl_types.h:1987
engine get_engine() const
Returns the engine of the primitive descriptor.
Definition: dnnl.hpp:2681
A binary primitive.
Definition: dnnl_types.h:701
Structure containing version information as per Semantic Versioning
Definition: dnnl_types.h:2047
Elementwise unary operation backward propagation primitive.
Definition: dnnl.hpp:5462
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const resampling_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a resampling backward propagation primitive.
Definition: dnnl.hpp:9943
deconvolution_backward_data(const primitive_desc &pd)
Constructs a deconvolution backward propagation primitive.
Definition: dnnl.hpp:4587
void set_rnn_data_qparams(float scale, float shift)
Sets quantization scale and shift parameters for RNN data tensors.
Definition: dnnl.hpp:2626
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:8366
primitive_desc(int concat_dimension, const std::vector< memory::desc > &srcs, const engine &engine, const primitive_attr &attr=primitive_attr())
Constructs a primitive descriptor for an out-of-place concatenation primitive.
Definition: dnnl.hpp:3185
dnnl_status_t DNNL_API dnnl_primitive_attr_set_zero_points(dnnl_primitive_attr_t attr, int arg, dnnl_dim_t count, int mask, const int32_t *zero_points)
Sets primitive attributes zero points for primitive operations for a given memory argument...
#define DNNL_ARG_DIFF_SRC_ITER
A special mnemonic for gradient (diff) of RNN input recurrent hidden state vector.
Definition: dnnl_types.h:1825
primitive_desc()=default
Default constructor. Produces an empty object.
LSTM cell.
Definition: dnnl_types.h:789
memory::desc diff_bias_desc() const
Returns the diff bias memory descriptor.
Definition: dnnl.hpp:7126
Packed weights format used in RNN.
Definition: dnnl_types.h:93
desc()=default
Default constructor. Produces an empty object.
int DNNL_API dnnl_post_ops_len(const_dnnl_post_ops_t post_ops)
Returns the length of post-ops.
#define DNNL_ARG_DST_ITER
A special mnemonic for RNN input recurrent hidden state vector.
Definition: dnnl_types.h:1766
desc(algorithm algorithm, 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)
Constructs a descriptor for a dilated deconvolution weights gradient primitive with bias...
Definition: dnnl.hpp:4713
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for concat primitive from a C API primitive descriptor which must h...
Definition: dnnl.hpp:3204
desc(prop_kind prop_kind, algorithm algorithm, const std::vector< float > &factors, const memory::desc &src_desc, const memory::desc &dst_desc)
Constructs a descriptor for a resampling forward propagation primitive.
Definition: dnnl.hpp:9774
Descriptor for an elementwise forward propagation primitive.
Definition: dnnl.hpp:5365
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a logsoftmax backward propagation primitive from a C API primit...
Definition: dnnl.hpp:5978
desc(prop_kind prop_kind, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &dst_desc)
Constructs a descriptor for an inner product forward propagation primitive without bias...
Definition: dnnl.hpp:6803
4D tensor blocked by 2nd dimension with block size 16
Definition: dnnl_types.h:230
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:9228
#define DNNL_ARG_SRC_ITER_C
A special mnemonic for RNN input recurrent cell state vector.
Definition: dnnl_types.h:1749
Inner product weights gradient primitive.
Definition: dnnl.hpp:6994
desc(const memory::dims &dims, data_type data_type, format_tag format_tag, bool allow_empty=false)
Constructs a memory descriptor.
Definition: dnnl.hpp:1646
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc diff_bias_desc() const
Returns the diff bias memory descriptor.
Definition: dnnl.hpp:4847
A reorder primitive.
Definition: dnnl_types.h:671
memory(const desc &md, const engine &engine, void *handle)
Constructs a memory object.
Definition: dnnl.hpp:1883
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:9668
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:9217
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 descriptor for softmax forward propagation primitive.
pooling_forward()=default
Default constructor. Produces an empty object.
A descriptor of a convolution operation.
Definition: dnnl_types.h:1087
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 descriptor for a dilated convolution weights gradient primitive.
desc(prop_kind prop_kind, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &bias_desc, const memory::desc &dst_desc)
Constructs a descriptor for an inner product forward propagation primitive with bias.
Definition: dnnl.hpp:6772
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a deconvolution forward propagation primitive.
Definition: dnnl.hpp:4368
memory::desc diff_weights_iter_desc() const
Returns diff weights iteration memory descriptor.
Definition: dnnl.hpp:7262
Descriptor for a resampling backward propagation primitive.
Definition: dnnl.hpp:9853
normalization_flags
Flags for normalization primitives.
Definition: dnnl.hpp:589
matmul()=default
Default constructor. Produces an empty object.
convolution_forward()=default
Default constructor. Produces an empty object.
status set_verbose(int level)
Configures verbose output to stdout.
Definition: dnnl.hpp:10008
softmax descriptor
Definition: dnnl_types.h:1971
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for an LRN forward propagation primitive from a C API primitive des...
Definition: dnnl.hpp:4954
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8800
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a GRU forward propagation primitive from a C API primitive desc...
Definition: dnnl.hpp:8587
dnnl_status_t DNNL_API dnnl_sum_primitive_desc_create(dnnl_primitive_desc_t *sum_primitive_desc, const dnnl_memory_desc_t *dst_desc, int n, const float *scales, const dnnl_memory_desc_t *src_descs, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine)
Creates a primitive descriptor for an (out-of-place) sum primitive.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const gru_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a GRU backward propagation primitive.
Definition: dnnl.hpp:8777
Elementwise: tanh-based gelu.
softmax_forward(const primitive_desc &pd)
Constructs a softmax forward propagation primitive.
Definition: dnnl.hpp:5674
Intel(R) Advanced Vector Extensions 512 for Intel(R) Xeon(R) Processor Scalable Family and Intel(R) C...
Definition: dnnl_types.h:2100
format_kind
Memory format kind.
Definition: dnnl.hpp:1157
binary(const primitive_desc &pd)
Constructs an elementwise binary operation primitive.
Definition: dnnl.hpp:9551
primitive_desc(const desc &desc, const engine &engine, const primitive_attr &attr=primitive_attr(), bool allow_empty=false)
Constructs a primitive descriptor for a shuffle forward propagation primitive.
Definition: dnnl.hpp:9334
no query
Definition: dnnl_types.h:1940
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:6863
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for an elementwise binary operator primitive.
Definition: dnnl.hpp:9505
dnnl_scratchpad_mode_t
Scratchpad mode.
Definition: dnnl_types.h:1649
Fuse with ReLU.
Definition: dnnl_types.h:853
data_type
Data type specification.
Definition: dnnl.hpp:1139
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc weights_desc(int idx) const
Returns a weights memory descriptor.
Definition: dnnl.hpp:2756
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:8026
Primitive descriptor for a logsoftmax backward propagation primitive.
Definition: dnnl.hpp:5928
Forward data propagation (training mode).
batch normalization descriptor
Definition: dnnl_types.h:1974
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:8379
The operation failed because requested functionality is not implemented.
primitive_desc()=default
Default constructor. Produces an empty object.
Out-of-place summation (sum) primitive.
Definition: dnnl.hpp:3233
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a deconvolution forward propagation primitive from a C API prim...
Definition: dnnl.hpp:4395
memory::desc weights_peephole_desc() const
Returns weights peephole memory descriptor.
Definition: dnnl.hpp:8005
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:9838
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:8803
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:9225
runtime estimation (seconds)
Definition: dnnl_types.h:1948
Backward propagation (with respect to all parameters).
Definition: dnnl_types.h:656
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:9964
An unspecified engine.
Definition: dnnl_types.h:1597
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a shuffle forward propagation primitive from a C API primitive ...
Definition: dnnl.hpp:9346
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for sum primitive from a C API primitive descriptor which must have...
Definition: dnnl.hpp:3310
Backward weights propagation.
eltwise_backward()=default
Default constructor. Produces an empty object.
static size_t get_count(kind kind)
Returns the number of engines of a certain kind.
Definition: dnnl.hpp:861
handle()=default
Constructs an empty handle object.
dnnl_status_t DNNL_API dnnl_logsoftmax_backward_desc_init(dnnl_logsoftmax_desc_t *logsoftmax_desc, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, int logsoftmax_axis)
Initializes a descriptor for logsoftmax backward propagation primitive.
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8598
gru_forward(const primitive_desc &pd)
Constructs a GRU forward propagation primitive.
Definition: dnnl.hpp:8633
5D tensor blocked by 1st dimension with block size 16
Definition: dnnl_types.h:263
Eltwise: ReLU.
Definition: dnnl_types.h:724
memory::desc diff_weights_desc(int idx) const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:2783
Descriptor for an LBR GRU forward propagation primitive.
Definition: dnnl.hpp:8876
dnnl_status_t DNNL_API dnnl_concat_primitive_desc_create(dnnl_primitive_desc_t *concat_primitive_desc, const dnnl_memory_desc_t *dst_desc, int n, int concat_dimension, const dnnl_memory_desc_t *src_descs, const_dnnl_primitive_attr_t attr, dnnl_engine_t engine)
Creates a primitive descriptor for an out-of-place concatenation primitive.
GPU engine.
Definition: dnnl_types.h:1601
Local response normalization (LRN) across multiple channels.
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 a descriptor for LRN forward propagation primitive.
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:6975
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 descriptor for shuffle backward propagation primitive.
softmax_backward()=default
Default constructor. Produces an empty object.
Batch normalization forward propagation primitive.
Definition: dnnl.hpp:6028
Convolution forward propagation primitive.
Definition: dnnl.hpp:3417
primitive_desc()=default
Default constructor. Produces an empty object.
Primitive descriptor for a deconvolution weights gradient primitive.
Definition: dnnl.hpp:4781
memory::desc mean_desc() const
Returns memory descriptor for mean.
Definition: dnnl.hpp:6313
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:5327
primitive_desc(const desc &desc, const engine &engine, const lstm_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an LSTM backward propagation primitive.
Definition: dnnl.hpp:8329
primitive_desc(const memory::desc &dst, int concat_dimension, const std::vector< memory::desc > &srcs, const engine &engine, const primitive_attr &attr=primitive_attr())
Constructs a primitive descriptor for an out-of-place concatenation primitive.
Definition: dnnl.hpp:3158
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:6305
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for an elementwise forward propagation primitive.
Definition: dnnl.hpp:5429
inner_product_forward(const primitive_desc &pd)
Constructs an inner product forward propagation primitive.
Definition: dnnl.hpp:6881
vanilla_rnn_forward(const primitive_desc &pd)
Constructs a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7515
Descriptor for an elementwise backward propagation primitive.
Definition: dnnl.hpp:5464
eltwise_backward(const primitive_desc &pd)
Constructs an eltwise backward propagation primitive.
Definition: dnnl.hpp:5568
void reset_with_clone(const_dnnl_primitive_desc_t pd)
Resets the value of the handle to a clone of a C API primitive descriptor.
Definition: dnnl.hpp:2881
(scratch) memory, additional to all inputs and outputs memory (bytes)
Definition: dnnl_types.h:1954
memory::desc diff_src_iter_desc() const
Returns diff source iteration memory descriptor.
Definition: dnnl.hpp:9238
cl_command_queue get_ocl_command_queue() const
Returns the underlying OpenCL queue object.
Definition: dnnl.hpp:1028
memory::desc scratchpad_desc() const
Returns the scratchpad memory descriptor.
Definition: dnnl.hpp:2839
Elementwise unary operation forward propagation primitive.
Definition: dnnl.hpp:5363
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:8606
desc(prop_kind prop_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 &weights_peephole_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)
Constructs a descriptor for an LSTM (with or without peephole) forward propagation primitive...
Definition: dnnl.hpp:7835
Local response normalization (LRN) backward propagation primitive.
Definition: dnnl.hpp:4979
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:8397
memory::desc diff_bias_desc() const
Returns diff bias memory descriptor.
Definition: dnnl.hpp:8849
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &desc, const engine &engine, const layer_normalization_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a layer normalization backward propagation primitive.
Definition: dnnl.hpp:6654
Eltwise: pow.
Definition: dnnl_types.h:759
memory::desc src_iter_c_desc() const
Returns source recurrent cell state memory descriptor.
Definition: dnnl.hpp:7184
5D tensor blocked by 2nd dimension with block size 4
Definition: dnnl_types.h:274
lstm_forward()=default
Default constructor. Produces an empty object.
memory::desc diff_src_iter_desc() const
Returns diff source iteration memory descriptor.
Definition: dnnl.hpp:8420
permuted 4D tensor
Definition: dnnl_types.h:199
An opaque structure to describe an engine.
void get_zero_points(int arg, int &mask, std::vector< int32_t > &zero_points) const
Returns zero points correspondence mask and values.
Definition: dnnl.hpp:2525
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5446
desc(prop_kind prop_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)
Constructs a descriptor for a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7403
void append_dw_k3s2p1(memory::data_type weights_data_type, memory::data_type bias_data_type, memory::data_type dst_data_type, int mask, const std::vector< float > &scales)
Appends a depthwise post-op convolution with stride 2.
Definition: dnnl.hpp:2293
desc(prop_kind prop_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)
Constructs a descriptor for a GRU backward propagation primitive.
Definition: dnnl.hpp:8708
desc(algorithm algorithm, const memory::desc &data_desc, const memory::desc &diff_data_desc, memory::dim local_size, float alpha, float beta, float k=1.f)
Constructs a descriptor for an LRN backward propagation primitive.
Definition: dnnl.hpp:5007
desc()=default
Default constructor. Produces an empty object.
Vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7345
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:4113
resampling_backward(const primitive_desc &pd)
Constructs a resampling backward propagation primitive.
Definition: dnnl.hpp:9973
primitive_desc_base(dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind)
Constructs a primitive descriptor base object from a clone of a C API primitive descriptor after veri...
Definition: dnnl.hpp:2901
lrn_forward()=default
Default constructor. Produces an empty object.
primitive_desc()=default
Default constructor. Produces an empty object.
desc(prop_kind prop_kind, const memory::desc &diff_data_desc, const memory::desc &data_desc, float epsilon, normalization_flags flags)
Constructs a descriptor for layer normalization backward propagation primitive.
Definition: dnnl.hpp:6623
#define DNNL_ARG_SRC_ITER
A special mnemonic for RNN input recurrent hidden state vector.
Definition: dnnl_types.h:1743
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:4966
inner_product_backward_weights(const primitive_desc &pd)
Constructs an inner product weights gradient primitive.
Definition: dnnl.hpp:7137
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a resampling backward propagation primitive from a C API primit...
Definition: dnnl.hpp:9956
Forward data propagation (inference mode).
Definition: dnnl_types.h:650
Undefined RNN flags.
Definition: dnnl_types.h:1419
memory::desc query_md(query what, int idx=0) const
Returns a memory descriptor.
Definition: dnnl.hpp:2718
A sum primitive.
Definition: dnnl_types.h:677
memory::desc variance_desc() const
Returns memory descriptor for variance.
Definition: dnnl.hpp:6717
desc(algorithm algorithm, 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)
Constructs a descriptor for a dilated deconvolution backward propagation primitive.
Definition: dnnl.hpp:4496
DNNL exception class.
Definition: dnnl.hpp:87
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:9432
#define DNNL_ARG_BIAS
Bias tensor argument.
Definition: dnnl_types.h:1799
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:7703
void get_params_dw_k3s2p1(int index, memory::data_type &weights_data_type, memory::data_type &bias_data_type, memory::data_type &dst_data_type, int &mask, std::vector< float > &scales) const
Returns the parameters of an depthwise post-op with stride 2.
Definition: dnnl.hpp:2319
size_t DNNL_API dnnl_memory_desc_get_size(const dnnl_memory_desc_t *memory_desc)
Returns the size of a memory descriptor.
Intel(R) Advanced Vector Extensions 512 subset for Intel(R) Xeon Phi(TM) Processors x200 Series...
Definition: dnnl_types.h:2092
primitive_desc()=default
Default constructor. Produces an empty object.
void set_data_handle(void *handle) const
Sets memory buffer.
Definition: dnnl.hpp:1952
Forward data propagation (inference mode).
A descriptor of a element-wise operation.
Definition: dnnl_types.h:1162
dnnl_status_t DNNL_API dnnl_post_ops_get_params_sum(const_dnnl_post_ops_t post_ops, int index, float *scale)
Returns the parameters of an accumulation (sum) post-op.
A descriptor of a Softmax operation.
Definition: dnnl_types.h:1214
Descriptor for a convolution weights gradient primitive.
Definition: dnnl.hpp:3868
An opaque structure for a chain of post operations.
primitive_desc(const memory &src, const memory &dst, const primitive_attr &attr=primitive_attr())
Constructs a primitive descriptor for reorder primitive.
Definition: dnnl.hpp:3038
A descriptor of an inner product operation.
Definition: dnnl_types.h:1383
Descriptor for a deconvolution weights gradient primitive.
Definition: dnnl.hpp:4593
The operation failed because of incorrect function arguments.
Definition: dnnl_types.h:45
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a resampling forward propagation primitive. ...
Definition: dnnl.hpp:9802
Forward data propagation, alias for dnnl::prop_kind::forward_training.
desc(prop_kind prop_kind, const memory::desc &data_desc, const memory::desc &stat_desc, float epsilon, normalization_flags flags)
Constructs a descriptor for layer normalization forward propagation primitive.
Definition: dnnl.hpp:6397
int len() const
Returns the number of post-ops entries.
Definition: dnnl.hpp:2094
runtime estimation (seconds), unimplemented
resampling_forward(const primitive_desc &pd)
Constructs a resampling forward propagation primitive.
Definition: dnnl.hpp:9847
desc(prop_kind prop_kind, algorithm algorithm, const std::vector< float > &factors, const memory::desc &src_desc)
Constructs a descriptor for a resampling forward propagation primitive using source memory descriptor...
Definition: dnnl.hpp:9741
Pooling forward propagation primitive.
Definition: dnnl.hpp:5102
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a layer normalization forward propagation primitive.
Definition: dnnl.hpp:6468
dnnl_rnn_direction_t
A direction of RNN primitive execution.
Definition: dnnl_types.h:1423
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:3673
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:7690
desc(algorithm algorithm, const memory::desc &diff_data_desc, const memory::desc &data_desc, float alpha=0, float beta=0)
Constructs a descriptor for an elementwise backward propagation primitive.
Definition: dnnl.hpp:5485
inner product descriptor
Definition: dnnl_types.h:1976
5D tensor blocked by 2nd dimension with block size 16
Definition: dnnl_types.h:267
6D tensor blocked by 2nd dimension with block size 4
Definition: dnnl_types.h:304
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for an inner product forward propagation primitive from a C API pri...
Definition: dnnl.hpp:6857
batch_normalization_forward(const primitive_desc &pd)
Constructs a batch normalization forward propagation primitive.
Definition: dnnl.hpp:6182
status gemm_u8s8s32(char transa, char transb, char offsetc, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const uint8_t *A, dnnl_dim_t lda, uint8_t ao, const int8_t *B, dnnl_dim_t ldb, int8_t bo, float beta, int32_t *C, dnnl_dim_t ldc, const int32_t *co)
Performs integer matrix-matrix multiply on 8-bit unsigned matrix A, 8-bit signed matrix B...
Definition: dnnl.hpp:10078
dnnl_status_t DNNL_API dnnl_memory_get_memory_desc(const_dnnl_memory_t memory, const dnnl_memory_desc_t **memory_desc)
Returns the memory descriptor for a memory object.
dnnl_status_t
Status values returned by the library functions.
Definition: dnnl_types.h:39
memory::desc diff_src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5321
stream()=default
Constructs an empty stream.
Pooling backward propagation primitive.
Definition: dnnl.hpp:5219
memory::desc dst_iter_c_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8021
dnnl_status_t DNNL_API dnnl_primitive_create(dnnl_primitive_t *primitive, const_dnnl_primitive_desc_t primitive_desc)
Creates a primitive.
Binary mul.
Definition: dnnl_types.h:803
LRN within a single channel.
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:5206
dnnl_status_t DNNL_API dnnl_post_ops_destroy(dnnl_post_ops_t post_ops)
Destroys post-ops.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const convolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a convolution weights gradient primitive.
Definition: dnnl.hpp:4095
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:8394
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 a memory descriptor.
memory::desc diff_weights_layer_desc() const
Returns diff weights layer memory descriptor.
Definition: dnnl.hpp:8839
Primitive descriptor for a batch normalization forward propagation primitive.
Definition: dnnl.hpp:6089
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:7982
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a layer normalization backward propagation primitive from a C A...
Definition: dnnl.hpp:6687
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:8808
A softmax primitive.
Definition: dnnl_types.h:685
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5553
memory::desc diff_dst_layer_desc() const
Returns diff destination layer memory descriptor.
Definition: dnnl.hpp:7283
memory::desc weights_peephole_desc() const
Returns weights peephole memory descriptor.
Definition: dnnl.hpp:8389
int64_t dnnl_dim_t
A type to describe tensor dimension.
Definition: dnnl_types.h:897
dnnl_status_t DNNL_API dnnl_primitive_desc_clone(dnnl_primitive_desc_t *primitive_desc, const_dnnl_primitive_desc_t existing_primitive_desc)
Clones a primitive descriptor.
Forward data propagation (alias for dnnl_forward_training).
Definition: dnnl_types.h:654
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:9015
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:9023
stream & wait()
Waits for all primitives executing in the stream to finish.
Definition: dnnl.hpp:1038
primitive kind
Definition: dnnl_types.h:1943
dnnl_status_t DNNL_API dnnl_engine_get_ocl_context(dnnl_engine_t engine, cl_context *context)
Returns the OpenCL context associated with an engine.
matrix multiplication (matmul) descriptor
Definition: dnnl_types.h:1981
shuffle_backward()=default
Default constructor. Produces an empty object.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:9542
Default stream configuration.
Definition: dnnl_types.h:2014
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6299
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a batch normalization forward propagation primitive from a C AP...
Definition: dnnl.hpp:6130
Shuffle forward propagation primitive.
Definition: dnnl.hpp:9288
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a softmax forward propagation primitive.
Definition: dnnl.hpp:5629
error(dnnl_status_t status, const char *message)
Constructs an instance of an exception class.
Definition: dnnl.hpp:95
LRN within a single channel.
Definition: dnnl_types.h:785
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 a descriptor for an LSTM backward propagation primitive.
dnnl_data_type_t
Data type specification.
Definition: dnnl_types.h:62
post_ops()
Constructs an empty sequence of post-ops.
Definition: dnnl.hpp:2086
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:6502
plain 4D tensor
Definition: dnnl_types.h:180
const_dnnl_primitive_desc_t get_primitive_desc() const
Returns the C API primitive descriptor of the underlying C API primitive.
Definition: dnnl.hpp:369
bool next_impl()
Advances the primitive iterator to the next implementation.
Definition: dnnl.hpp:3380
pooling_backward(const primitive_desc &pd)
Constructs a pooling backward propagation primitive.
Definition: dnnl.hpp:5336
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a vanilla RNN backward propagation primitive from a C API primi...
Definition: dnnl.hpp:7685
memory::desc diff_dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:5772
batch_normalization_forward()=default
Default constructor. Produces an empty object.
plain 6D tensor
Definition: dnnl_types.h:182
Tensor concatenation (concat) primitive.
Definition: dnnl.hpp:3131
desc(algorithm algorithm, const memory::desc &diff_src_desc, const memory::desc &diff_dst_desc)
Constructs a descriptor for a resampling backward propagation primitive using source and destination ...
Definition: dnnl.hpp:9870
Primitive attributes.
Definition: dnnl.hpp:2358
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:9199
dnnl_status_t DNNL_API dnnl_engine_create(dnnl_engine_t *engine, dnnl_engine_kind_t kind, size_t index)
Creates an engine.
Eltwise: exp (dst for backward)
Definition: dnnl_types.h:773
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:3850
Winograd convolution.
Definition: dnnl_types.h:716
Intel(R) Advanced Vector Extensions 512 for Intel(R) Xeon(R) Processor Scalable Family and Intel(R) C...
primitive_attr(dnnl_primitive_attr_t attr)
Creates primitive attributes from a C API dnnl_primitive_attr_t handle.
Definition: dnnl.hpp:2374
#define DNNL_ARG_DIFF_SRC_ITER_C
A special mnemonic for gradient (diff) of RNN input recurrent cell state vector.
Definition: dnnl_types.h:1831
Vanilla RNN backward propagation primitive.
Definition: dnnl.hpp:7519
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a layer normalization forward propagation primitive from a C AP...
Definition: dnnl.hpp:6495
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:4844
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:5076
desc(prop_kind prop_kind, algorithm algorithm, 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)
Constructs a descriptor for a convolution forward propagation primitive with bias.
Definition: dnnl.hpp:3454
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:7216
Layer normalization backward propagation primitive.
Definition: dnnl.hpp:6549
desc(prop_kind prop_kind, algorithm algorithm, const memory::desc &src_desc, const memory::desc &dst_desc)
Constructs a descriptor for a resampling forward propagation primitive using source and destination m...
Definition: dnnl.hpp:9718
desc(prop_kind prop_kind, const memory::desc &diff_data_desc, const memory::desc &data_desc, float epsilon, normalization_flags flags)
Constructs a batch normalization descriptor for backward propagation.
Definition: dnnl.hpp:6222
dnnl_format_tag_t
Memory format tag specification.
Definition: dnnl_types.h:164
void append_eltwise(float scale, algorithm algorithm, float alpha, float beta)
Appends an elementwise post-op.
Definition: dnnl.hpp:2157
Max pooling.
Definition: dnnl_types.h:775
dnnl_status_t DNNL_API dnnl_memory_get_engine(const_dnnl_memory_t memory, dnnl_engine_t *engine)
Returns the engine of a memory object.
void get_params_eltwise(int index, float &scale, algorithm &algorithm, float &alpha, float &beta) const
Returns parameters of an elementwise post-up.
Definition: dnnl.hpp:2171
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a convolution forward propagation primitive.
Definition: dnnl.hpp:3637
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:7493
Eltwise: natural logarithm.
Definition: dnnl_types.h:755
memory::desc diff_src_layer_desc() const
Returns diff source layer memory descriptor.
Definition: dnnl.hpp:7724
memory::desc diff_bias_desc() const
Returns the diff bias memory descriptor.
Definition: dnnl.hpp:4127
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for an LSTM forward propagation primitive from a C API primitive de...
Definition: dnnl.hpp:7976
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 descriptor base object from a clone of a C API primitive descriptor after veri...
Definition: dnnl.hpp:2933
const char * what() const noexcept override
Returns the explanatory string.
Definition: dnnl.hpp:99
primitive_desc()=default
Default constructor. Produces an empty object.
dnnl_status_t DNNL_API dnnl_memory_map_data(const_dnnl_memory_t memory, void **mapped_ptr)
Maps a memory object and returns a pointer to a host-side buffer with a copy of its contents...
Unidirectional execution of RNN primitive from left to right.
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 descriptor for inner product backward propagation.
primitive_desc()=default
Default constructor. Produces an empty object.
const dnnl_version_t DNNL_API * dnnl_version()
Returns library version information.
kind
Kinds of engines.
Definition: dnnl.hpp:842
4D CNN activations tensor blocked by channels with block size 4, an alias to dnnl_aBcd4b ...
Definition: dnnl_types.h:475
Base class for all computational primitives.
Definition: dnnl.hpp:273
T get(bool allow_empty=false) const
Returns the underlying C API handle.
Definition: dnnl.hpp:188
Primitive descriptor for a batch normalization backward propagation primitive.
Definition: dnnl.hpp:6236
const version_t * version()
Returns library version information.
Definition: dnnl.hpp:10013
4D tensor blocked by 2nd dimension with block size 8
Definition: dnnl_types.h:248
Out-of-order execution.
Definition: dnnl_types.h:2012
Descriptor for a GRU backward propagation primitive.
Definition: dnnl.hpp:8639
Fuse normalization with ReLU.
Binary min.
Definition: dnnl_types.h:807
pooling_backward()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &desc, const engine &engine, const softmax_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a softmax backward propagation primitive.
Definition: dnnl.hpp:5728
Batch normalization backward propagation primitive.
Definition: dnnl.hpp:6186
status
Status values returned by the library functions.
Definition: dnnl.hpp:9990
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:6508
memory::desc bias_desc() const
Returns the bias memory descriptor.
Definition: dnnl.hpp:4410
Primitive descriptor for a logsoftmax forward propagation primitive.
Definition: dnnl.hpp:5828
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:3853
Default stream configuration.
permuted 3D tensor
Definition: dnnl_types.h:187
primitive_desc()=default
Default constructor. Produces an empty object.
5D CNN activations tensor blocked by channels with block size 4, an alias to dnnl_aBcde4b ...
Definition: dnnl_types.h:466
layer_normalization_backward()=default
Default constructor. Produces an empty object.
Average pooling (alias for dnnl_pooling_avg_exclude_padding)
Definition: dnnl_types.h:781
Descriptor for a batch normalization forward propagation primitive.
Definition: dnnl.hpp:6030
Primitive descriptor for an LRN backward propagation primitive.
Definition: dnnl.hpp:5020
Descriptor for an elementwise binary operator primitive.
Definition: dnnl.hpp:9460
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:7196
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for an LSTM forward propagation primitive.
Definition: dnnl.hpp:7950
#define DNNL_ARG_DIFF_BIAS
Gradient (diff) of the bias tensor argument.
Definition: dnnl_types.h:1879
memory::desc diff_src_layer_desc() const
Returns diff source layer memory descriptor.
Definition: dnnl.hpp:8829
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6700
3D tensor blocked by 2nd dimension with block size 8
Definition: dnnl_types.h:221
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const inner_product_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an inner product backward propagation primitive.
Definition: dnnl.hpp:6957
Binary add.
Definition: dnnl_types.h:801
memory::desc dst_iter_c_desc() const
Returns destination recurrent cell state memory descriptor.
Definition: dnnl.hpp:7230
deconvolution descriptor
Definition: dnnl_types.h:1968
A pooling primitive.
Definition: dnnl_types.h:687
#define DNNL_ARG_WEIGHTS_PEEPHOLE
A special mnemonic for RNN weights applied to the peephole weights.
Definition: dnnl_types.h:1796
desc(prop_kind prop_kind, algorithm algorithm, 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)
Constructs a descriptor for a dilated convolution forward propagation primitive without bias...
Definition: dnnl.hpp:3602
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a GRU backward propagation primitive from a C API primitive des...
Definition: dnnl.hpp:8790
rnn descriptor
Definition: dnnl_types.h:1977
void set_scales(int arg, int mask, const std::vector< float > &scales)
Sets scaling factors for primitive operations for a given memory argument.
Definition: dnnl.hpp:2508
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:6978
memory consumption (bytes)
LSTM forward propagation primitive.
Definition: dnnl.hpp:7769
memory::data_type data_type() const
Returns the data type of the memory descriptor.
Definition: dnnl.hpp:1828
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 descriptor for pooling forward propagation primitive.
Eltwise: logistic.
Definition: dnnl_types.h:742
status sgemm(char transa, char transb, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const float *A, dnnl_dim_t lda, const float *B, dnnl_dim_t ldb, float beta, float *C, dnnl_dim_t ldc)
Performs single-precision matrix-matrix multiply.
Definition: dnnl.hpp:10070
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:6703
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:3075
desc(prop_kind prop_kind, algorithm algorithm, 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)
Constructs a descriptor for a dilated deconvolution forward propagation primitive without bias...
Definition: dnnl.hpp:4333
resampling_backward()=default
Default constructor. Produces an empty object.
A descriptor of a shuffle operation.
Definition: dnnl_types.h:1140
dnnl_status_t DNNL_API dnnl_reorder_primitive_desc_create(dnnl_primitive_desc_t *reorder_primitive_desc, const dnnl_memory_desc_t *src_desc, dnnl_engine_t src_engine, const dnnl_memory_desc_t *dst_desc, dnnl_engine_t dst_engine, const_dnnl_primitive_attr_t attr)
Creates a primitive descriptor for a reorder primitive.
resampling_forward()=default
Default constructor. Produces an empty object.
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:9961
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a LBR GRU forward propagation primitive.
Definition: dnnl.hpp:8961
desc(prop_kind prop_kind, const memory::desc &data_desc, float epsilon, normalization_flags flags)
Constructs a batch normalization descriptor for forward propagation.
Definition: dnnl.hpp:6076
Intel(R) Advanced Vector Extensions 512 with Intel(R) DL Boost and Bfloat16 Support for Intel(R) Xeon...
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:3317
Eltwise: hyperbolic tangent non-linearity (tanh) (dst for backward)
Definition: dnnl_types.h:765
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 a descriptor for LBR GRU backward propagation primitive.
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 descriptor for shuffle forward propagation primitive.
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 a memory descriptor by reshaping an existing one.
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:4572
lbr_gru_forward(const primitive_desc &pd)
Constructs an LBR GRU forward propagation primitive.
Definition: dnnl.hpp:9034
Winograd deconvolution.
Definition: dnnl_types.h:722
dnnl_status_t DNNL_API dnnl_set_max_cpu_isa(dnnl_cpu_isa_t isa)
Sets the maximal ISA DNNL can dispatch to on the CPU.
memory::desc bias_desc() const
Returns the bias memory descriptor.
Definition: dnnl.hpp:9663
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:6511
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 descriptor using dimensions and memory format tag.
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:8813
primitive_desc()=default
Default constructor. Produces an empty object.
Primitive descriptor for an LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9144
layer_normalization_backward(const primitive_desc &pd)
Constructs a layer normalization backward propagation primitive.
Definition: dnnl.hpp:6731
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for an inner product weights update primitive from a C API primitiv...
Definition: dnnl.hpp:7110
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 a descriptor for eltwise forward propagation primitive.
dnnl_dim_t dim
Integer type for representing dimension sizes and indices.
Definition: dnnl.hpp:1121
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:7698
reorder()=default
Default constructor. Produces an empty object.
Convolution backward propagation primitive.
Definition: dnnl.hpp:3695
number of outputs expected
Definition: dnnl_types.h:1946
primitive_desc(const desc &desc, const engine &engine, const lbr_gru_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9161
Primitive descriptor for a deconvolution forward propagation primitive.
Definition: dnnl.hpp:4354
memory::desc diff_src_iter_c_desc() const
Returns diff source recurrent cell state memory descriptor.
Definition: dnnl.hpp:7250
reorder(const primitive_desc &pd)
Constructs a reorder primitive.
Definition: dnnl.hpp:3083
desc(prop_kind prop_kind, algorithm algorithm, 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)
Constructs a descriptor for a dilated deconvolution forward propagation primitive with bias...
Definition: dnnl.hpp:4284
memory::desc bias_desc() const
Returns the bias memory descriptor.
Definition: dnnl.hpp:6872
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const inner_product_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an inner product weights update primitive.
Definition: dnnl.hpp:7097
Descriptor for a matmul primitive.
Definition: dnnl.hpp:9569
#define DNNL_MAX_NDIMS
Maximum number of dimensions a tensor can have.
Definition: dnnl_types.h:865
engine get_dst_engine() const
Returns the engine on which the destination memory is allocated.
Definition: dnnl.hpp:3067
lbr_gru_backward(const primitive_desc &pd)
Constructs an LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9274
gru_backward()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a matmul primitive.
Definition: dnnl.hpp:9642
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:7708
Primitive descriptor for a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7428
Elementwise: x*sigmoid(a*x)
plain 1D tensor
Definition: dnnl_types.h:177
The user manages the scratchpad allocation by querying and providing the scratchpad memory to primiti...
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:7716
Softmax forward propagation primitive.
Definition: dnnl.hpp:5582
primitive_desc()=default
Default constructor. Produces an empty object.
Bidirectional execution of RNN primitive with concatenation of the results.
Definition: dnnl_types.h:1430
permuted 2D tensor
Definition: dnnl_types.h:192
permuted 5D tensor
Definition: dnnl_types.h:201
A layer normalization primitive.
dnnl_status_t DNNL_API dnnl_primitive_get_primitive_desc(const_dnnl_primitive_t primitive, const_dnnl_primitive_desc_t *primitive_desc)
Retrieves a constant reference to the primitive descriptor of a given primitive.
Descriptor for a deconvolution backward propagation primitive.
Definition: dnnl.hpp:4425
memory::desc diff_dst_layer_desc() const
Returns diff destination layer memory descriptor.
Definition: dnnl.hpp:9258
engine(kind kind, size_t index)
Constructs an engine.
Definition: dnnl.hpp:870
desc(algorithm algorithm, 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)
Constructs a descriptor for a convolution weights gradient primitive with bias.
Definition: dnnl.hpp:3900
permuted 6D tensor
Definition: dnnl_types.h:189
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:7224
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 workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:7719
memory::desc src1_desc() const
Returns the memory descriptor for source #1.
Definition: dnnl.hpp:9539
desc()=default
Default constructor. Produces an empty object.
memory::desc diff_src_iter_c_desc() const
Returns diff source recurrent cell state memory descriptor.
Definition: dnnl.hpp:8425
void get_scales(int arg, int &mask, std::vector< float > &scales) const
Returns scaling factors correspondence mask and values for a given memory argument.
Definition: dnnl.hpp:2478
memory::desc src_desc(int idx=0) const
Returns a source memory descriptor.
Definition: dnnl.hpp:3208
dnnl::primitive::kind get_kind() const
Returns the kind of the primitive descriptor.
Definition: dnnl.hpp:2869
5D CNN activations tensor blocked by channels with block size 8, an alias to dnnl_aBcde8b ...
Definition: dnnl_types.h:469
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a softmax backward propagation primitive from a C API primitive...
Definition: dnnl.hpp:5761
propagation kind
Definition: dnnl_types.h:1962
Descriptor for a GRU forward propagation primitive.
Definition: dnnl.hpp:8477
inner_product_forward()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7442
cpu_isa
CPU instruction set flags.
Definition: dnnl.hpp:10033
desc(prop_kind prop_kind, algorithm algorithm, 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)
Constructs a descriptor for a deconvolution forward propagation primitive without bias...
Definition: dnnl.hpp:4234
An inner product primitive.
Definition: dnnl_types.h:695
desc(const memory::dims &dims, data_type data_type, const memory::dims &strides, bool allow_empty=false)
Constructs a memory descriptor by strides.
Definition: dnnl.hpp:1673
Use global statistics.
Definition: dnnl_types.h:827
Primitive descriptor for an elementwise binary operator primitive.
Definition: dnnl.hpp:9492
dnnl_status_t DNNL_API dnnl_post_ops_append_dw_k3s1p1(dnnl_post_ops_t post_ops, dnnl_data_type_t weights_data_type, dnnl_data_type_t bias_data_type, dnnl_data_type_t dst_data_type, dnnl_dim_t count, int mask, const float *scales)
Appends a depthwise post-op convolution with stride 1.
Primitive descriptor for a GRU backward propagation primitive.
Definition: dnnl.hpp:8742
memory::desc diff_dst_iter_desc() const
Returns diff destination iteration memory descriptor.
Definition: dnnl.hpp:9263
engine get_engine() const
Returns the associated engine.
Definition: dnnl.hpp:1909
GRU cell.
Definition: dnnl_types.h:791
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6869
memory::desc variance_desc() const
Returns memory descriptor for variance.
Definition: dnnl.hpp:6517
The operation was successful.
Definition: dnnl_types.h:41
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:8601
Undefined propagation kind.
desc(algorithm algorithm, const std::vector< float > &factors, const memory::desc &diff_src_desc, const memory::desc &diff_dst_desc)
Constructs a descriptor for resampling backward propagation primitive.
Definition: dnnl.hpp:9893
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a deconvolution backward propagation primitive from a C API pri...
Definition: dnnl.hpp:4567
deconvolution_forward()=default
Default constructor. Produces an empty object.
static void validate_dims(const std::vector< T > &v, int min_size=0)
Helper function that validates that an std::vector of dimensions can be safely converted to the C API...
Definition: dnnl.hpp:1133
primitive_desc()=default
Default constructor. Produces an empty object.
dnnl_status_t DNNL_API dnnl_post_ops_append_dw_k3s2p1(dnnl_post_ops_t post_ops, dnnl_data_type_t weights_data_type, dnnl_data_type_t bias_data_type, dnnl_data_type_t dst_data_type, dnnl_dim_t count, int mask, const float *scales)
Appends a depthwise post-op convolution with stride 2.
memory::desc diff_dst_iter_desc() const
Returns diff destination iteration memory descriptor.
Definition: dnnl.hpp:7291
kind get_kind() const
Returns the kind of the primitive.
Definition: dnnl.hpp:376
Elementwise: hyperbolic tangent non-linearity (tanh)
A descriptor of a Layer Normalization operation.
Definition: dnnl_types.h:1346
8-bit signed integer.
Definition: dnnl_types.h:74
Primitive descriptor for an elementwise forward propagation primitive.
Definition: dnnl.hpp:5399
convolution descriptor
Definition: dnnl_types.h:1967
concat()=default
Default constructor. Produces an empty object.
RNN cell.
Definition: dnnl_types.h:787
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:2806
Alias for dnnl_unidirectional_left2right.
Definition: dnnl_types.h:1435
A (out-of-place) concat primitive.
Definition: dnnl_types.h:675
handle(T t, bool weak=false)
Constructs a handle wrapper object from a C API handle.
Definition: dnnl.hpp:172
convolution_backward_data()=default
Default constructor. Produces an empty object.
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 descriptor for a convolution forward propagation primitive.
desc()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for an elementwise binary operator primitive.
Definition: dnnl.hpp:9520
dnnl_status_t DNNL_API dnnl_set_jit_profiling_jitdumpdir(const char *dir)
Sets JIT dump output path.
desc(algorithm algorithm, 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)
Constructs a descriptor for a convolution weights gradient primitive without bias.
Definition: dnnl.hpp:3944
dnnl_status_t DNNL_API dnnl_primitive_destroy(dnnl_primitive_t primitive)
Destroys a primitive.
Intel(R) Advanced Vector Extensions 512 with Intel(R) DL Boost Support for Intel(R) Xeon(R) Processor...
Definition: dnnl_types.h:2105
Undefined memory format tag.
Definition: dnnl_types.h:166
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a resampling forward propagation primitive from a C API primiti...
Definition: dnnl.hpp:9829
#define DNNL_ARG_DIFF_SRC_LAYER
A special mnemonic for gradient (diff) of RNN input vector.
Definition: dnnl_types.h:1819
The operation failed because of incorrect function arguments.
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 descriptor for a dilated convolution backward propagation primitive.
dnnl_status_t DNNL_API dnnl_deconvolution_forward_desc_init(dnnl_deconvolution_desc_t *deconv_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 descriptor for a deconvolution forward propagation primitive.
dnnl_status_t DNNL_API dnnl_post_ops_append_sum(dnnl_post_ops_t post_ops, float scale)
Appends an accumulation (sum) to post-ops.
permuted 5D tensor
Definition: dnnl_types.h:188
Eltwise: square root.
Definition: dnnl_types.h:734
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 primitive attributes output scaling factors correspondence mask and values.
stream(const engine &engine, flags flags=flags::default_flags)
Constructs a stream for the specified engine and with behavior controlled by the specified flags...
Definition: dnnl.hpp:1006
primitive_desc()=default
Default constructor. Produces an empty object.
lstm_backward(const primitive_desc &pd)
Constructs an LSTM backward propagation primitive.
Definition: dnnl.hpp:8471
primitive_desc()=default
Default constructor. Produces an empty object.
desc(prop_kind prop_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)
Constructs a descriptor for a GRU forward propagation primitive.
Definition: dnnl.hpp:8525
desc(algorithm algorithm, 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)
Constructs a descriptor for dilated convolution backward propagation primitive.
Definition: dnnl.hpp:3771
Primitive descriptor for resampling backward propagation primitive.
Definition: dnnl.hpp:9906
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a deconvolution forward propagation primitive.
Definition: dnnl.hpp:4384
void set_output_scales(int mask, const std::vector< float > &scales)
Sets output scaling factors correspondence mask and values.
Definition: dnnl.hpp:2460
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 descriptor for a binary primitive.
memory::desc dst_desc(int idx) const
Returns a destination memory descriptor.
Definition: dnnl.hpp:2747
Primitive descriptor for an LSTM forward propagation primitive.
Definition: dnnl.hpp:7937
static void wrap_c_api(dnnl_status_t status, const char *message)
A convenience function for wrapping calls to C API functions.
Definition: dnnl.hpp:106
Intel(R) Advanced Vector Extensions.
lrn_forward(const primitive_desc &pd)
Constructs an LRN forward propagation primitive.
Definition: dnnl.hpp:4975
desc(const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &dst_desc)
Constructs a descriptor for a matmul primitive.
Definition: dnnl.hpp:9584
convolution_forward(const primitive_desc &pd)
Constructs a convolution forward propagation primitive.
Definition: dnnl.hpp:3691
permuted 3D tensor
Definition: dnnl_types.h:195
dnnl_status_t DNNL_API dnnl_set_jit_dump(int enable)
Configures dumping of JIT-generated code.
Primitive or engine failed on execution.
GRU backward propagation primitive.
Definition: dnnl.hpp:8637
Inner product backward propagation primitive.
Definition: dnnl.hpp:6885
dnnl_status_t DNNL_API dnnl_deconvolution_backward_data_desc_init(dnnl_deconvolution_desc_t *deconv_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 descriptor for a deconvolution backward propagation primitive.
Backward bias propagation.
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a matmul primitive.
Definition: dnnl.hpp:9628
LBR GRU forward propagation primitive.
Definition: dnnl.hpp:8874
rnn_primitive_desc_base()=default
Default constructor. Produces an empty object.
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:6722
source memory desc
Definition: dnnl_types.h:1986
A base class for descriptors of all primitives that have an operation descriptor and that support ite...
Definition: dnnl.hpp:3335
#define DNNL_ARG_DIFF_DST_LAYER
A special mnemonic for gradient (diff) of RNN output vector.
Definition: dnnl_types.h:1840
Eltwise: swish.
Definition: dnnl_types.h:753
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:4578
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:9435
engine get_src_engine() const
Returns the engine on which the source memory is allocated.
Definition: dnnl.hpp:3061
desc()=default
Default constructor. Produces an empty object.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:2800
desc(const memory::desc &diff_data_desc, int axis, int group_size)
Constructs a descriptor for a shuffle backward propagation primitive.
Definition: dnnl.hpp:9387
#define DNNL_ARG_TO
A special mnemonic for reorder destination argument.
Definition: dnnl_types.h:1758
pooling_forward(const primitive_desc &pd)
Constructs a pooling forward propagation primitive.
Definition: dnnl.hpp:5215
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a layer normalization forward propagation primitive.
Definition: dnnl.hpp:6484
status set_jit_profiling_flags(unsigned flags)
Sets library profiling flags.
Definition: dnnl.hpp:10023
dnnl_status_t DNNL_API dnnl_stream_wait(dnnl_stream_t stream)
Waits for all primitives in the execution stream to finish computations.
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a LBR GRU backward propagation primitive from a C API primitive...
Definition: dnnl.hpp:9194
dnnl_primitive_kind_t DNNL_API dnnl_post_ops_get_kind(const_dnnl_post_ops_t post_ops, int index)
Returns the kind of a post-op entry.
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5200
desc(algorithm algorithm, 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)
Constructs a descriptor for a deconvolution backward propagation primitive.
Definition: dnnl.hpp:4453
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 descriptor for a batch normalization backward propagation primitive.
dnnl_status_t DNNL_API dnnl_primitive_attr_set_scales(dnnl_primitive_attr_t attr, int arg, dnnl_dim_t count, int mask, const float *scales)
Sets primitive attributes scaling factors for primitive operations for a given memory argument...
memory::desc diff_bias_desc() const
Returns diff bias memory descriptor.
Definition: dnnl.hpp:8445
Memory descriptor.
Definition: dnnl_types.h:1003
dnnl_status_t DNNL_API dnnl_engine_get_ocl_device(dnnl_engine_t engine, cl_device_id *device)
Returns the OpenCL device associated with an engine.
Elementwise binary operator primitive.
Definition: dnnl.hpp:9458
dnnl_data_type_t data_type
Data type of the tensor elements.
Definition: dnnl_types.h:1023
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for an LSTM backward propagation primitive from a C API primitive d...
Definition: dnnl.hpp:8361
primitive_desc()=default
Default constructor. Produces an empty object.
desc(algorithm algorithm, const memory::desc &src0, const memory::desc &src1, const memory::desc &dst)
Constructs a descriptor for an elementwise binary operator primitive.
Definition: dnnl.hpp:9481
memory::desc mean_desc() const
Returns memory descriptor for mean.
Definition: dnnl.hpp:6714
A matrix multiplication primitive.
Definition: dnnl_types.h:705
Queried element is not required for given primitive.
Definition: dnnl_types.h:53
The library manages the scratchpad allocation according to the policy specified by the DNNL_ENABLE_CO...
void get_params_sum(int index, float &scale) const
Returns the parameters of an accumulation (sum) post-op.
Definition: dnnl.hpp:2137
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:5665
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 descriptor for layer normalization forward propagation primitive.
Descriptor for a softmax backward propagation primitive.
Definition: dnnl.hpp:5680
primitive_attr get_primitive_attr() const
Returns the primitive attributes.
Definition: dnnl.hpp:2857
Eltwise: erf-based gelu.
Definition: dnnl_types.h:761
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:3211
dnnl_status_t DNNL_API dnnl_engine_destroy(dnnl_engine_t engine)
Destroys an engine.
The operation failed due to an out-of-memory condition.
Definition: dnnl_types.h:43
Deconvolution backward propagation primitive.
Definition: dnnl.hpp:4423
handle< T, traits > & operator=(const handle< T, traits > &)=default
Assignment operator.
Primitive descriptor for a reorder primitive.
Definition: dnnl.hpp:2997
Backward weights propagation.
Definition: dnnl_types.h:660
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a softmax forward propagation primitive.
Definition: dnnl.hpp:5645
layer normalization descriptor
void append_sum(float scale=1.)
Appends an accumulation (sum) post-op.
Definition: dnnl.hpp:2128
Queried element is not required for given primitive.
primitive_desc()=default
Default constructor. Produces an empty object.
Primitive descriptor for a convolution forward propagation primitive.
Definition: dnnl.hpp:3623
Default order execution.
Definition: dnnl_types.h:2008
memory::desc diff_dst_iter_c_desc() const
Returns diff destination recurrent cell state memory descriptor.
Definition: dnnl.hpp:8460
#define DNNL_ARG_DIFF_DST_ITER_C
A special mnemonic for gradient (diff) of RNN input recurrent cell state vector.
Definition: dnnl_types.h:1852
memory::desc diff_weights_layer_desc() const
Returns diff weights layer memory descriptor.
Definition: dnnl.hpp:7734
workspace memory desc
Definition: dnnl_types.h:1992
primitive_desc(const desc &desc, const engine &engine, const inner_product_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an inner product weights update primitive.
Definition: dnnl.hpp:7077
weights gradient (diff) memory desc
inner_product_backward_weights()=default
Default constructor. Produces an empty object.
dnnl_status_t DNNL_API dnnl_softmax_backward_desc_init(dnnl_softmax_desc_t *softmax_desc, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *data_desc, int softmax_axis)
Initializes a descriptor for softmax backward propagation primitive.
primitive_desc(const engine &src_engine, const memory::desc &src_md, const engine &dst_engine, const memory::desc &dst_md, const primitive_attr &attr=primitive_attr())
Constructs a primitive descriptor for reorder primitive.
Definition: dnnl.hpp:3018
Memory object.
Definition: dnnl.hpp:1119
convolution_backward_weights(const primitive_desc &pd)
Constructs a convolution weights gradient primitive.
Definition: dnnl.hpp:4138
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.
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:7475
Descriptor for a pooling backward propagation primitive.
Definition: dnnl.hpp:5221
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:6143
memory::desc diff_weights_iter_desc() const
Returns diff weights iteration memory descriptor.
Definition: dnnl.hpp:9248
dnnl_status_t DNNL_API dnnl_sgemm(char transa, char transb, dnnl_dim_t M, dnnl_dim_t N, dnnl_dim_t K, float alpha, const float *A, dnnl_dim_t lda, const float *B, dnnl_dim_t ldb, float beta, float *C, dnnl_dim_t ldc)
Performs single-precision matrix-matrix multiply.
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:7995
Elementwise: exponent (dst for backward)
eltwise descriptor
Definition: dnnl_types.h:1970
number of inputs expected
Definition: dnnl_types.h:1945
shuffle descriptor
Definition: dnnl_types.h:1969
Average pooling include padding.
Definition: dnnl_types.h:777
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:8010
Linear (Bilinear, Trilinear) resampling method.
Weights format used in 8bit Winograd convolution.
Definition: dnnl_types.h:91
logsoftmax_backward()=default
Default constructor. Produces an empty object.
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc variance_desc() const
Returns memory descriptor for variance.
Definition: dnnl.hpp:6316
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:5079
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:7170
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 *scales)
Sets quantization scaling factors for RNN weights tensors.
desc(const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &bias_desc, const memory::desc &dst_desc)
Constructs a descriptor for a matmul primitive.
Definition: dnnl.hpp:9606
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const convolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a convolution backward propagation primitive.
Definition: dnnl.hpp:3829
32-bit/single-precision floating point.
Definition: dnnl_types.h:70
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:8614
desc(prop_kind prop_kind, algorithm algorithm, const memory::desc &data_desc, float alpha=0, float beta=0)
Constructs a descriptor for an elementwise forward propagation primitive.
Definition: dnnl.hpp:5386
dnnl_query_t convert_to_c(query query)
Converts query enum value from C++ API to C API type.
Definition: dnnl.hpp:808
dnnl_status_t DNNL_API dnnl_memory_get_ocl_mem_object(const_dnnl_memory_t memory, cl_mem *mem_object)
Returns an OpenCL memory object associated with a memory object.
permuted 5D tensor
Definition: dnnl_types.h:200
engine scratchpad_engine() const
Returns the engine on which the scratchpad memory is located.
Definition: dnnl.hpp:2845
Intel(R) Advanced Vector Extensions 512 with Intel(R) DL Boost and Bfloat16 Support for Intel(R) Xeon...
Definition: dnnl_types.h:2110
Primitive descriptor for a softmax backward propagation primitive.
Definition: dnnl.hpp:5711
Reorder primitive.
Definition: dnnl.hpp:2995
4D CNN activations tensor blocked by channels with block size 8, an alias to dnnl_aBcd8b ...
Definition: dnnl_types.h:478
bool operator==(const desc &other) const
An equality operator.
Definition: dnnl.hpp:1847
Descriptor for an inner product forward propagation primitive.
Definition: dnnl.hpp:6747
memory::desc src_iter_c_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:7990
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:7118
Descriptor for a shuffle forward propagation primitive.
Definition: dnnl.hpp:9290
lrn descriptor
Definition: dnnl_types.h:1973
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 object.
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:6694
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 a descriptor for eltwise backward propagation primitive.
memory::desc diff_src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5073
Primitive descriptor for LSTM backward propagation.
Definition: dnnl.hpp:8313
4D tensor blocked by 1st and 2nd dimension with block size 8
Definition: dnnl_types.h:253
A shuffle primitive.
Definition: dnnl_types.h:673
memory::desc mean_desc() const
Returns memory descriptor for mean.
Definition: dnnl.hpp:6150
engine(const handle< dnnl_primitive_desc_t > &pd)
Constructs an engine based on a primitive from the primitive descriptor pd by querying its engine...
Definition: dnnl.hpp:898
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a logsoftmax forward propagation primitive. ...
Definition: dnnl.hpp:5842
memory::desc diff_dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:5993
for creating scratchpad memory
Definition: dnnl_types.h:1957
dnnl_status_t DNNL_API dnnl_primitive_attr_set_scratchpad_mode(dnnl_primitive_attr_t attr, dnnl_scratchpad_mode_t mode)
Sets primitive attributes scratchpad mode.
primitive_desc(const desc &desc, const engine &engine, const vanilla_rnn_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a vanilla RNN backward propagation primitive.
Definition: dnnl.hpp:7652
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_backward_weights_desc_init(dnnl_deconvolution_desc_t *deconv_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 descriptor for a dilated deconvolution weights gradient primitive.
memory::desc diff_weights_iter_desc() const
Returns diff weights iteration memory descriptor.
Definition: dnnl.hpp:8844
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:6321
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:5556
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a binary primitive from a C API primitive descriptor that must ...
Definition: dnnl.hpp:9529
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.
bool operator!=(const handle &other) const
Inequality operator.
Definition: dnnl.hpp:223
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:2824
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a LBR GRU forward propagation primitive from a C API primitive ...
Definition: dnnl.hpp:8988
permuted 4D tensor
Definition: dnnl_types.h:196
bool operator==(const handle< T, traits > &other) const
Equality operator.
Definition: dnnl.hpp:213
desc(const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_dst_desc)
Constructs a descriptor for an inner product descriptor weights update primitive without bias...
Definition: dnnl.hpp:7047
Intel(R) Advanced Vector Extensions 2.
4D tensor blocked by 2nd dimension with block size 4
Definition: dnnl_types.h:236
Binary max.
Definition: dnnl_types.h:805
Unspecified format kind.
Definition: dnnl_types.h:85
void set_zero_points(int arg, int mask, const std::vector< int32_t > &zero_points)
Sets zero points for primitive operations for a given memory argument.
Definition: dnnl.hpp:2560
Resampling forward propagation.
Definition: dnnl.hpp:9692
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 descriptor for pooling backward propagation primitive.
Average pooling exclude padding.
Definition: dnnl_types.h:779
memory::desc diff_src_desc(int idx) const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:2765
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:4121
desc(algorithm algorithm, 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)
Constructs a descriptor for a dilated convolution weights gradient primitive without bias...
Definition: dnnl.hpp:4039
3D CNN activations tensor blocked by channels with block size 16, an alias to dnnl_aBc16b ...
Definition: dnnl_types.h:481
dnnl_alg_kind_t
Kinds of algorithms.
Definition: dnnl_types.h:711
primitive_desc()=default
Default constructor. Produces an empty object.
Primitive descriptor for a RNN backward propagation primitive.
Definition: dnnl.hpp:7635
permuted 3D tensor
Definition: dnnl_types.h:198
desc get_desc() const
Returns the associated memory descriptor.
Definition: dnnl.hpp:1901
dnnl_rnn_flags_t
Flags for RNN cell.
Definition: dnnl_types.h:1417
dnnl_status_t DNNL_API dnnl_memory_set_ocl_mem_object(dnnl_memory_t memory, cl_mem mem_object)
Sets OpenCL memory object associated with a memory object.
bool operator!=(const desc &other) const
An inequality operator.
Definition: dnnl.hpp:1855
Base class for all primitive descriptors.
Definition: dnnl.hpp:2673
Primitive descriptor for a layer normalization backward propagation primitive.
Definition: dnnl.hpp:6637
Descriptor for a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7347
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:4407
memory::desc src0_desc() const
Returns the memory descriptor for source #0.
Definition: dnnl.hpp:9536
desc reshape(const memory::dims &dims, bool allow_empty=false) const
Constructs a memory descriptor by reshaping an existing one.
Definition: dnnl.hpp:1759
dnnl_status_t DNNL_API dnnl_primitive_desc_destroy(dnnl_primitive_desc_t primitive_desc)
Destroys a primitive descriptor.
dnnl_status_t DNNL_API dnnl_post_ops_create(dnnl_post_ops_t *post_ops)
Creates empty post-ops sequence.
dnnl_binary_desc_t data
Underlying C operation descriptor.
Definition: dnnl.hpp:9462
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const batch_normalization_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a batch normalization backward propagation primitive.
Definition: dnnl.hpp:6273
An LRN primitive.
Definition: dnnl_types.h:689
desc(prop_kind prop_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 &weights_peephole_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_weights_peephole_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)
Constructs an LSTM (with or without peephole) descriptor for backward propagation using prop_kind...
Definition: dnnl.hpp:8146
reorder(const memory &src, const memory &dst, const primitive_attr &attr=primitive_attr())
Constructs a reorder primitive that would reorder data between memory objects having the same memory ...
Definition: dnnl.hpp:3092
A descriptor of a Local Response Normalization (LRN) operation.
Definition: dnnl_types.h:1282
Primitive descriptor for a shuffle backward propagation primitive.
Definition: dnnl.hpp:9396
int ndims
Number of dimensions.
Definition: dnnl_types.h:1005
dnnl_stream_flags_t
Stream flags.
Definition: dnnl_types.h:2005
Undefined propagation type.
Definition: dnnl_types.h:643
dnnl_status_t DNNL_API dnnl_engine_get_kind(dnnl_engine_t engine, dnnl_engine_kind_t *kind)
Returns the kind of an engine.
DNNL C API handle wrapper class.
Definition: dnnl.hpp:139
Primitive or engine failed on execution.
Definition: dnnl_types.h:51
void set_rnn_weights_qparams(int mask, const std::vector< float > &scales)
Sets quantization scaling factors for RNN weights tensors.
Definition: dnnl.hpp:2659
op descriptor
Definition: dnnl_types.h:1966
dnnl_status_t DNNL_API dnnl_primitive_attr_clone(dnnl_primitive_attr_t *attr, const_dnnl_primitive_attr_t existing_attr)
Clones primitive attributes.
primitive_desc_base()=default
Default constructor. Produces an empty object.
desc submemory_desc(const memory::dims &dims, const memory::dims &offsets, bool allow_empty=false) const
Constructs a memory descriptor for a region inside an area described by this memory descriptor...
Definition: dnnl.hpp:1703
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a convolution forward propagation primitive.
Definition: dnnl.hpp:3653
lrn_backward()=default
Default constructor. Produces an empty object.
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a vanilla RNN forward propagation primitive from a C API primit...
Definition: dnnl.hpp:7469
Primitive descriptor for an inner product forward propagation primitive.
Definition: dnnl.hpp:6816
memory::desc src_desc(int idx=0) const
Returns a source memory descriptor.
Definition: dnnl.hpp:9533
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:7210
Descriptor for a deconvolution forward propagation primitive.
Definition: dnnl.hpp:4154
Eltwise: exponent.
Definition: dnnl_types.h:744
desc(algorithm algorithm, 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)
Constructs a descriptor for a dilated deconvolution weights gradient primitive without bias...
Definition: dnnl.hpp:4760
weights memory descriptor desc
lbr_gru_backward()=default
Default constructor. Produces an empty object.
dnnl_status_t DNNL_API dnnl_primitive_desc_iterator_destroy(dnnl_primitive_desc_iterator_t iterator)
Destroys a primitive descriptor iterator.
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8999
Local response normalization (LRN) across multiple channels.
Definition: dnnl_types.h:783
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const pooling_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a pooling backward propagation primitive.
Definition: dnnl.hpp:5303
resampling descriptor
Definition: dnnl_types.h:1982
dnnl_status_t DNNL_API dnnl_logsoftmax_forward_desc_init(dnnl_logsoftmax_desc_t *logsoftmax_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, int logsoftmax_axis)
Initializes a descriptor for logsoftmax forward propagation primitive.
primitive_desc(const desc &desc, const engine &engine, const deconvolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a deconvolution backward propagation primitive.
Definition: dnnl.hpp:4534
Forward data propagation, alias for dnnl::prop_kind::forward_inference.
softmax_forward()=default
Default constructor. Produces an empty object.
Descriptor for a logsoftmax backward propagation primitive.
Definition: dnnl.hpp:5897
memory::desc diff_dst_layer_desc() const
Returns diff destination layer memory descriptor.
Definition: dnnl.hpp:7749
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:8795
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a pooling backward propagation primitive from a C API primitive...
Definition: dnnl.hpp:5316
desc(prop_kind prop_kind, algorithm algorithm, 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)
Constructs a descriptor for pooling forward propagation primitive.
Definition: dnnl.hpp:5136
Primitive descriptor GRU forward propagation primitive.
Definition: dnnl.hpp:8548
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 descriptor for inner product weights gradient primitive.
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:8000
plain 3D tensor
Definition: dnnl_types.h:179
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:2812
Use scale and shift parameters.
Definition: dnnl_types.h:840
A descriptor of a Batch Normalization operation.
Definition: dnnl_types.h:1313
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 a descriptor for LBR GRU forward propagation primitive.
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:7711
primitive_desc()=default
Default constructor. Produces an empty object.
Intel(R) Advanced Vector Extensions 2.
Definition: dnnl_types.h:2088
3D CNN activations tensor blocked by channels with block size 4, an alias to dnnl_aBc4b ...
Definition: dnnl_types.h:484
Eltwise: exponential linear unit (elu) (dst for backward)
Definition: dnnl_types.h:767
Logsoftmax forward propagation primitive.
Definition: dnnl.hpp:5795
Convolution algorithm (either direct or Winograd) to be chosen just in time.
Eltwise: exponential linear unit (elu)
Definition: dnnl_types.h:728
dnnl_status_t DNNL_API dnnl_matmul_desc_init(dnnl_matmul_desc_t *matmul_desc, 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 a matrix multiplication descriptor.
dnnl_primitive_desc_t DNNL_API dnnl_primitive_desc_iterator_fetch(const_dnnl_primitive_desc_iterator_t iterator)
Fetches the current primitive descriptor from a primitive descriptor iterator.
size_t DNNL_API dnnl_engine_get_count(dnnl_engine_kind_t kind)
Returns the number of engines of a particular kind.
6D tensor blocked by 2nd dimension with block size 16
Definition: dnnl_types.h:297
Forward data propagation (alias for dnnl_forward_inference).
Definition: dnnl_types.h:652
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5662
Primitive descriptor for a matmul primitive.
Definition: dnnl.hpp:9616
5D CNN activations tensor blocked by channels with block size 16, an alias to dnnl_aBcde16b ...
Definition: dnnl_types.h:463
An opaque structure to describe a primitive descriptor.
Descriptor for a LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9040
rnn_primitive_desc_base(dnnl_primitive_desc_t pd, dnnl::prop_kind prop_kind, dnnl::algorithm cell_kind)
Constructs an RNN primitive descriptor base from a C API primitive descriptor while checking that it ...
Definition: dnnl.hpp:7164
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:6302
Eltwise: abs.
Definition: dnnl_types.h:732
bool is_zero() const
Checks whether the memory descriptor is zero (empty).
Definition: dnnl.hpp:1841
Descriptor for resampling forward propagation.
Definition: dnnl.hpp:9694
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:2830
dnnl_primitive_kind_t convert_to_c(primitive::kind kind)
Converts primitive kind enum value from C++ API to C API type.
Definition: dnnl.hpp:365
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:6146
Forward data propagation (training mode).
Definition: dnnl_types.h:646
A deconvolution primitive.
permuted 5D tensor
Definition: dnnl_types.h:186
Elementwise: ReLU (dst for backward)
lstm_forward(const primitive_desc &pd)
Constructs an LSTM forward propagation primitive.
Definition: dnnl.hpp:8037
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7458
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for an LRN backward propagation primitive from a C API primitive de...
Definition: dnnl.hpp:5068
Eltwise: tanh-based gelu (alias for dnnl_eltwise_gelu_tanh)
Definition: dnnl_types.h:751
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a logsoftmax forward propagation primitive from a C API primiti...
Definition: dnnl.hpp:5869
Descriptor for an LSTM backward propagation primitive.
Definition: dnnl.hpp:8043
source gradient (diff) memory desc
A rnn primitive.
Definition: dnnl_types.h:697
An opaque structure to describe an execution stream.
Primitive descriptor for an inner product backward propagation primitive.
Definition: dnnl.hpp:6920
Descriptor for a layer normalization backward propagation primitive.
Definition: dnnl.hpp:6551
A logsoftmax primitive.
Definition: dnnl_types.h:703
memory::desc diff_src_iter_desc() const
Returns diff source iteration memory descriptor.
Definition: dnnl.hpp:8834
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const logsoftmax_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a logsoftmax backward propagation primitive.
Definition: dnnl.hpp:5965
rnn_flags
RNN cell flags.
Definition: dnnl.hpp:626
dnnl_status_t DNNL_API dnnl_resampling_backward_desc_init(dnnl_resampling_desc_t *resampling_desc, dnnl_alg_kind_t alg_kind, const float *factors, const dnnl_memory_desc_t *diff_src_desc, const dnnl_memory_desc_t *diff_dst_desc)
Initializes a descriptor for resampling backward propagation primitive.
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:6137
Descriptor for a shuffle primitive backward propagation primitive.
Definition: dnnl.hpp:9371
primitive_desc(const desc &desc, const engine &engine, const pooling_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a pooling backward propagation primitive.
Definition: dnnl.hpp:5284
memory::desc diff_src_iter_desc() const
Returns diff source iteration memory descriptor.
Definition: dnnl.hpp:7729
logsoftmax_forward(const primitive_desc &pd)
Constructs a logsoftmax forward propagation primitive.
Definition: dnnl.hpp:5891
The operation failed because requested functionality is not implemented.
Definition: dnnl_types.h:47
Eltwise: gelu.
Definition: dnnl_types.h:749
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for an eltwise forward propagation primitive from a C API primitive...
Definition: dnnl.hpp:5440
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:4401
memory::desc diff_dst_layer_desc() const
Returns diff destination layer memory descriptor.
Definition: dnnl.hpp:8854
Eltwise: hyperbolic tangent non-linearity (tanh)
Definition: dnnl_types.h:726
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const layer_normalization_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a layer normalization backward propagation primitive.
Definition: dnnl.hpp:6674
Primitive descriptor for a deconvolution backward propagation primitive.
Definition: dnnl.hpp:4517
desc(prop_kind prop_kind, const memory::desc &data_desc, int logsoftmax_axis)
Constructs a descriptor for a logsoftmax forward propagation primitive.
Definition: dnnl.hpp:5817
Softmax backward propagation primitive.
Definition: dnnl.hpp:5678
Bidirectional execution of RNN primitive with summation of the results.
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:4575
Primitive descriptor for an LBR GRU forward propagation primitive.
Definition: dnnl.hpp:8947
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 descriptor for a region inside an area described by an existing memory descripto...
A descriptor of resampling operation.
Definition: dnnl_types.h:1565
void set_ocl_mem_object(cl_mem mem_object)
Sets the OpenCL memory object mem_object associated with the memory.
Definition: dnnl.hpp:2016
desc(algorithm algorithm, 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)
Constructs a descriptor for a deconvolution weights gradient primitive with bias. ...
Definition: dnnl.hpp:4624
dnnl_status_t DNNL_API dnnl_set_verbose(int level)
Configures verbose output to stdout.
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:8402
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for an LRN forward propagation primitive.
Definition: dnnl.hpp:4928
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 primitive attributes post-ops.
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a convolution weights gradient primitive from a C API primitive...
Definition: dnnl.hpp:4108
scratchpad_mode get_scratchpad_mode() const
Returns the scratchpad mode.
Definition: dnnl.hpp:2378
query
Primitive descriptor query specification.
Definition: dnnl.hpp:713
memory::desc diff_dst_layer_desc() const
Returns diff destination layer memory descriptor.
Definition: dnnl.hpp:8450
Primitive descriptor for a sum primitive.
Definition: dnnl.hpp:3235
T * map_data() const
Maps the data of the memory.
Definition: dnnl.hpp:1977
dnnl_prop_kind_t
Kinds of propagation.
Definition: dnnl_types.h:640
#define DNNL_ARG_DIFF_WEIGHTS_LAYER
A special mnemonic for diff of RNN weights applied to the layer input.
Definition: dnnl_types.h:1864
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 descriptor for a batch normalization forward propagation primitive. ...
scratchpad_mode
Scratchpad mode.
Definition: dnnl.hpp:402
Descriptor for a pooling forward propagation primitive.
Definition: dnnl.hpp:5104
desc(prop_kind prop_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)
Constructs a descriptor for an LSTM forward propagation primitive.
Definition: dnnl.hpp:7911
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:6296
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const lbr_gru_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9181
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a GRU forward propagation primitive.
Definition: dnnl.hpp:8576
primitive_desc()=default
Default constructor. Produces an empty object.
Convolution weights gradient primitive.
Definition: dnnl.hpp:3866
Elementwise: gelu alias for dnnl::algorithm::eltwise_gelu_tanh.
primitive_desc(const desc &desc, const engine &engine, const convolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a convolution weights gradient primitive.
Definition: dnnl.hpp:4076
Nearest Neighbor Resampling Method.
Definition: dnnl_types.h:809
std::vector< dim > dims
Vector of dimensions.
Definition: dnnl.hpp:1124
concat(const primitive_desc &pd)
Constructs a concatenation primitive.
Definition: dnnl.hpp:3219
permuted 4D tensor
Definition: dnnl_types.h:194
memory::dim query_s64(query what) const
Returns a memory::dim value (same as int64_t).
Definition: dnnl.hpp:2697
desc()
Constructs a zero (empty) memory descriptor.
Definition: dnnl.hpp:1630
dnnl_status_t DNNL_API dnnl_stream_destroy(dnnl_stream_t stream)
Destroys an execution stream.
desc(prop_kind prop_kind, algorithm algorithm, 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)
Constructs a descriptor for a convolution forward propagation primitive without bias.
Definition: dnnl.hpp:3501
primitive_desc(const desc &desc, const engine &engine, const deconvolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a deconvolution weights update primitive.
Definition: dnnl.hpp:4798
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.
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for an eltwise backward propagation primitive from a C API primitiv...
Definition: dnnl.hpp:5548
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 a descriptor for vanilla RNN forward propagation primitive.
16-bit/half-precision floating point.
Definition: dnnl_types.h:66
primitive_desc(const desc &desc, const primitive_attr &attr, const engine &engine, const deconvolution_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a deconvolution backward propagation primitive.
Definition: dnnl.hpp:4554
Primitive descriptor for a softmax forward propagation primitive.
Definition: dnnl.hpp:5615
Primitive descriptor for eltwise backward propagation.
Definition: dnnl.hpp:5498
source engine
Definition: dnnl_types.h:1959
Descriptor for a softmax forward propagation primitive.
Definition: dnnl.hpp:5584
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 descriptor for inner product forward propagation.
logsoftmax_forward()=default
Default constructor. Produces an empty object.
const post_ops get_post_ops() const
Returns post-ops previously set via set_post_ops().
Definition: dnnl.hpp:2571
primitive_desc(const desc &desc, const engine &engine, bool allow_empty=false)
Constructs a primitive descriptor for a GRU forward propagation primitive.
Definition: dnnl.hpp:8561
memory::desc dst_iter_c_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8405
dnnl_status_t DNNL_API dnnl_resampling_forward_desc_init(dnnl_resampling_desc_t *resampling_desc, dnnl_prop_kind_t prop_kind, dnnl_alg_kind_t alg_kind, const float *factors, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *dst_desc)
Initializes a descriptor for a resampling forward propagation primitive.
dnnl_normalization_flags_t
Flags for batch normalization primitive.
Definition: dnnl_types.h:815
weights grad. memory desc
Definition: dnnl_types.h:1989
engine()=default
Constructs an empty engine.
shuffle_forward()=default
Default constructor. Produces an empty object.
#define DNNL_ARG_DST_ITER_C
A special mnemonic for LSTM output recurrent cell state vector.
Definition: dnnl_types.h:1772
algorithm
Kinds of algorithms.
Definition: dnnl.hpp:471
Resampling backward propagation primitive.
Definition: dnnl.hpp:9851
status set_jit_dump(int enable)
Configures dumping of JIT-generated code.
Definition: dnnl.hpp:10018
memory::desc variance_desc() const
Returns memory descriptor for variance.
Definition: dnnl.hpp:6154
deconvolution_backward_weights()=default
Default constructor. Produces an empty object.
Primitive iterator passed over last primitive descriptor.
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:8410
Primitive descriptor for a resampling forward propagation primitive.
Definition: dnnl.hpp:9788
format_tag
Memory format tag specification.
Definition: dnnl.hpp:1213
A convolution primitive.
Definition: dnnl_types.h:679
memory desc of an execute argument
Definition: dnnl_types.h:1994
#define DNNL_ARG_FROM
A special mnemonic for reorder source argument.
Definition: dnnl_types.h:1737
Backward bias propagation.
Definition: dnnl_types.h:662
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:7501
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:8994
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a deconvolution weights gradient primitive from a C API primiti...
Definition: dnnl.hpp:4831
Eltwise: logistic (dst for backward)
Definition: dnnl_types.h:771
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for an inner product backward propagation primitive from a C API pr...
Definition: dnnl.hpp:6970
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a pooling forward propagation primitive from a C API primitive ...
Definition: dnnl.hpp:5194
weights memory descriptor desc
Definition: dnnl_types.h:1988
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:7488
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:5766
dnnl_status_t DNNL_API dnnl_primitive_attr_get_zero_points(const_dnnl_primitive_attr_t attr, int arg, dnnl_dim_t *count, int *mask, const int32_t **zero_points)
Returns count, correspondence zero point mask, and a pointer to a constant int32_t array of zero_poin...
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 associated with an OpenCL device and an OpenCL context.
primitive_desc()=default
Default constructor. Produces an empty object.
desc(algorithm algorithm, 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)
Constructs a descriptor for pooling backward propagation primitive.
Definition: dnnl.hpp:5249
void append_dw_k3s1p1(memory::data_type weights_data_type, memory::data_type bias_data_type, memory::data_type dst_data_type, int mask, const std::vector< float > &scales)
Appends a depthwise post-op convolution with stride 1.
Definition: dnnl.hpp:2208
Linear Resampling Method.
Definition: dnnl_types.h:811
Descriptor for a logsoftmax forward propagation primitive.
Definition: dnnl.hpp:5797
Eltwise: soft_relu.
Definition: dnnl_types.h:740
vanilla_rnn_backward(const primitive_desc &pd)
Constructs a vanilla RNN backward propagation primitive.
Definition: dnnl.hpp:7765
Unidirectional execution of RNN primitive from right to left.
plain 5D tensor
Definition: dnnl_types.h:181
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:6293
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_backward_data_desc_init(dnnl_deconvolution_desc_t *deconv_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 descriptor for a dilated deconvolution backward propagation primitive.
primitive_desc(const desc &desc, const engine &engine, const eltwise_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for an elementwise backward propagation primitive.
Definition: dnnl.hpp:5515
primitive_attr()
Constructs default (empty) primitive attributes.
Definition: dnnl.hpp:2362
destination engine
Definition: dnnl_types.h:1960
size_t get_size() const
Returns size of the memory descriptor in bytes.
Definition: dnnl.hpp:1836
batch_normalization_backward(const primitive_desc &pd)
Constructs a batch normalization backward propagation primitive.
Definition: dnnl.hpp:6330
Eltwise: square.
Definition: dnnl_types.h:730
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:9658
#define DNNL_ARG_DIFF_WEIGHTS_PEEPHOLE
A special mnemonic for diff of RNN weights applied to the peephole weights.
Definition: dnnl_types.h:1876
dnnl_status_t DNNL_API dnnl_primitive_attr_set_post_ops(dnnl_primitive_attr_t attr, const_dnnl_post_ops_t post_ops)
Sets primitive attributes post-ops.
Descriptor for a convolution backward propagation primitive.
Definition: dnnl.hpp:3698
memory::desc diff_dst_iter_c_desc() const
Returns diff destination recurrent cell state memory descriptor.
Definition: dnnl.hpp:7297
A batch normalization primitive.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6140
An execution stream.
Definition: dnnl.hpp:981
memory::desc diff_bias_desc() const
Returns diff bias memory descriptor.
Definition: dnnl.hpp:9253
Elementwise: exponential linear unit (elu) (dst for backward)
convolution_backward_weights()=default
Default constructor. Produces an empty object.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6505
memory::desc diff_weights_iter_desc() const
Returns diff weights iteration memory descriptor.
Definition: dnnl.hpp:7739
dnnl_status_t DNNL_API dnnl_primitive_attr_get_scratchpad_mode(const_dnnl_primitive_attr_t attr, dnnl_scratchpad_mode_t *mode)
Returns the primitive attributes scratchpad mode.
Post-ops.
Definition: dnnl.hpp:2082
dnnl_status_t DNNL_API dnnl_dilated_deconvolution_forward_desc_init(dnnl_deconvolution_desc_t *deconv_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 descriptor for a dilated deconvolution forward propagation primitive.
primitive()=default
Default constructor. Constructs an empty object.
desc(prop_kind prop_kind, algorithm algorithm, const memory::desc &data_desc, memory::dim local_size, float alpha, float beta, float k=1.f)
Constructs a descriptor for a LRN forward propagation primitive.
Definition: dnnl.hpp:4902
Backward data propagation.
Matrix multiplication (matmul) primitive.
Definition: dnnl.hpp:9567