20 #ifndef ONEAPI_DNNL_DNNL_HPP 21 #define ONEAPI_DNNL_DNNL_HPP 23 #include "oneapi/dnnl/dnnl_config.h" 32 #include <unordered_map> 42 #ifndef DNNL_ENABLE_EXCEPTIONS 43 #if __cpp_exceptions || __EXCEPTIONS \ 44 || (defined(_MSC_VER) && !defined(__clang__)) 45 #define DNNL_ENABLE_EXCEPTIONS 1 47 #define DNNL_ENABLE_EXCEPTIONS 0 51 #if defined(__GNUC__) || defined(__clang__) 52 #define DNNL_TRAP() __builtin_trap() 53 #elif defined(__INTEL_COMPILER) || defined(_MSC_VER) 54 #define DNNL_TRAP() __debugbreak() 56 #error "unknown compiler" 59 #if DNNL_ENABLE_EXCEPTIONS 60 #define DNNL_THROW_ERROR(status, msg) throw error(status, msg) 63 #define DNNL_THROW_ERROR(status, msg) \ 84 struct error :
public std::exception {
96 const char *
what() const noexcept
override {
return message; }
109 template <
typename T>
110 void validate_container_size(
const T &v,
const char *error_message,
111 int min_size = 1,
int max_size = -1) {
112 const int size = (int)v.size();
113 if (size < min_size || (max_size >= 0 && size > max_size))
119 template <
typename T>
135 template <
typename T,
typename traits = handle_traits<T>>
139 std::shared_ptr<typename std::remove_pointer<T>::type> data_ {0};
142 bool operator==(
const T other)
const {
return other == data_.get(); }
143 bool operator!=(
const T other)
const {
return !(*
this == other); }
176 void reset(T t,
bool weak =
false) {
177 data_.reset(t, weak ? &dummy_destructor : traits::destructor);
185 T
get(
bool allow_empty =
false)
const {
186 T result = data_.get();
187 if (allow_empty ==
false && result ==
nullptr)
197 explicit operator T()
const {
return get(
true); }
202 explicit operator bool()
const {
return get(
true) !=
nullptr; }
211 return other.data_.get() == data_.get();
257 struct primitive_desc;
357 const std::unordered_map<int, memory> &args)
const;
371 "could not get a primitive descriptor from a primitive");
382 "could not get a primitive kind from a primitive descriptor");
472 undef = dnnl_alg_kind_undef,
664 #define DNNL_DEFINE_BITMASK_OPS(enum_name) \ 665 inline enum_name operator|(enum_name lhs, enum_name rhs) { \ 666 return static_cast<enum_name>( \ 667 static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); \ 670 inline enum_name operator&(enum_name lhs, enum_name rhs) { \ 671 return static_cast<enum_name>( \ 672 static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); \ 675 inline enum_name operator^(enum_name lhs, enum_name rhs) { \ 676 return static_cast<enum_name>( \ 677 static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); \ 680 inline enum_name &operator|=(enum_name &lhs, enum_name rhs) { \ 681 lhs = static_cast<enum_name>( \ 682 static_cast<unsigned>(lhs) | static_cast<unsigned>(rhs)); \ 686 inline enum_name &operator&=(enum_name &lhs, enum_name rhs) { \ 687 lhs = static_cast<enum_name>( \ 688 static_cast<unsigned>(lhs) & static_cast<unsigned>(rhs)); \ 692 inline enum_name &operator^=(enum_name &lhs, enum_name rhs) { \ 693 lhs = static_cast<enum_name>( \ 694 static_cast<unsigned>(lhs) ^ static_cast<unsigned>(rhs)); \ 698 inline enum_name operator~(enum_name rhs) { \ 699 return static_cast<enum_name>(~static_cast<unsigned>(rhs)); \ 900 "could not create an engine");
913 "could not get an engine from a primitive_desc");
914 reset(c_engine,
true);
922 "could not get kind of an engine");
931 template <
typename primitive_desc>
941 template <
typename primitive_desc>
946 "could not get an engine from a primitive_desc");
947 return engine(c_engine,
true);
1005 "could not create a stream");
1013 "could not get an engine from a stream object");
1014 return engine(c_engine,
true);
1117 template <
typename T>
1119 validate_container_size(
1420 AB16b16a = dnnl_AB16b16a,
1421 AB16b32a = dnnl_AB16b32a,
1422 AB16b64a = dnnl_AB16b64a,
1423 AB8b16a2b = dnnl_AB8b16a2b,
1424 AB8b32a2b = dnnl_AB8b32a2b,
1425 AB8b64a2b = dnnl_AB8b64a2b,
1426 AB4b16a4b = dnnl_AB4b16a4b,
1427 AB4b32a4b = dnnl_AB4b32a4b,
1428 AB4b64a4b = dnnl_AB4b64a4b,
1429 Abc16a = dnnl_Abc16a,
1430 ABc16a16b = dnnl_ABc16a16b,
1431 ABc4a4b = dnnl_ABc4a4b,
1434 ABc16b16a = dnnl_ABc16b16a,
1435 ABc16b32a = dnnl_ABc16b32a,
1436 ABc16b64a = dnnl_ABc16b64a,
1439 ABc4b16a4b = dnnl_ABc4b16a4b,
1440 ABc4b32a4b = dnnl_ABc4b32a4b,
1441 ABc4b64a4b = dnnl_ABc4b64a4b,
1442 ABc2b8a4b = dnnl_ABc2b8a4b,
1443 ABc16b16a4b = dnnl_ABc16b16a4b,
1444 ABc16b16a2b = dnnl_ABc16b16a2b,
1445 ABc4b4a = dnnl_ABc4b4a,
1446 ABc8a16b2a = dnnl_ABc8a16b2a,
1447 ABc8a8b = dnnl_ABc8a8b,
1448 ABc8a4b = dnnl_ABc8a4b,
1450 ABc8b16a2b = dnnl_ABc8b16a2b,
1451 ABc8b32a2b = dnnl_ABc8b32a2b,
1452 ABc8b64a2b = dnnl_ABc8b64a2b,
1453 ABc8b8a = dnnl_ABc8b8a,
1454 Abcd8a = dnnl_Abcd8a,
1455 Abcd16a = dnnl_Abcd16a,
1456 Abcd32a = dnnl_Abcd32a,
1457 ABcd16a16b = dnnl_ABcd16a16b,
1460 ABcd16b16a = dnnl_ABcd16b16a,
1461 ABcd16b32a = dnnl_ABcd16b32a,
1462 ABcd16b64a = dnnl_ABcd16b64a,
1463 aBCd16b16c = dnnl_aBCd16b16c,
1464 aBCd16c16b = dnnl_aBCd16c16b,
1465 Abcd4a = dnnl_Abcd4a,
1467 ABcd4b16a4b = dnnl_ABcd4b16a4b,
1468 ABcd4b32a4b = dnnl_ABcd4b32a4b,
1469 ABcd4b64a4b = dnnl_ABcd4b64a4b,
1470 ABcd2b8a4b = dnnl_ABcd2b8a4b,
1471 ABcd4b4a = dnnl_ABcd4b4a,
1472 ABcd4a4b = dnnl_ABcd4a4b,
1473 aBCd4c16b4c = dnnl_aBCd4c16b4c,
1474 aBCd2c8b4c = dnnl_aBCd2c8b4c,
1475 ABcd16b16a4b = dnnl_ABcd16b16a4b,
1476 ABcd16b16a2b = dnnl_ABcd16b16a2b,
1477 aBCd16c16b4c = dnnl_aBCd16c16b4c,
1478 aBCd16c16b2c = dnnl_aBCd16c16b2c,
1479 aBCd4c4b = dnnl_aBCd4c4b,
1480 aBCd4b4c = dnnl_aBCd4b4c,
1481 ABcd8a16b2a = dnnl_ABcd8a16b2a,
1482 ABcd8a8b = dnnl_ABcd8a8b,
1483 ABcd8a4b = dnnl_ABcd8a4b,
1486 ABcd8b16a2b = dnnl_ABcd8b16a2b,
1487 ABcd8b32a2b = dnnl_ABcd8b32a2b,
1488 ABcd8b64a2b = dnnl_ABcd8b64a2b,
1489 aBCd8b16c2b = dnnl_aBCd8b16c2b,
1492 aBCd8b8c = dnnl_aBCd8b8c,
1493 aBCd8b4c = dnnl_aBCd8b4c,
1494 aBCd8c16b2c = dnnl_aBCd8c16b2c,
1495 aBCd8c8b = dnnl_aBCd8c8b,
1496 Abcde16a = dnnl_Abcde16a,
1497 Abcde32a = dnnl_Abcde32a,
1498 ABcde16a16b = dnnl_ABcde16a16b,
1501 ABcde16b16a = dnnl_ABcde16b16a,
1502 ABcde16b32a = dnnl_ABcde16b32a,
1503 ABcde16b64a = dnnl_ABcde16b64a,
1504 aBCde16b16c = dnnl_aBCde16b16c,
1505 aBCde16c16b = dnnl_aBCde16c16b,
1506 aBCde2c8b4c = dnnl_aBCde2c8b4c,
1507 Abcde4a = dnnl_Abcde4a,
1509 ABcde4b4a = dnnl_ABcde4b4a,
1510 ABcde4a4b = dnnl_ABcde4a4b,
1511 aBCde4b4c = dnnl_aBCde4b4c,
1512 aBCde4c16b4c = dnnl_aBCde4c16b4c,
1513 aBCde16c16b4c = dnnl_aBCde16c16b4c,
1514 aBCde16c16b2c = dnnl_aBCde16c16b2c,
1515 aBCde4c4b = dnnl_aBCde4c4b,
1516 Abcde8a = dnnl_Abcde8a,
1517 ABcde8a8b = dnnl_ABcde8a8b,
1518 ABcde8a4b = dnnl_ABcde8a4b,
1520 ABcde8b16a2b = dnnl_ABcde8b16a2b,
1521 ABcde8b32a2b = dnnl_ABcde8b32a2b,
1522 ABcde8b64a2b = dnnl_ABcde8b64a2b,
1524 ABcde4b32a4b = dnnl_ABcde4b32a4b,
1525 ABcde4b64a4b = dnnl_ABcde4b64a4b,
1527 aBCde8b16c2b = dnnl_aBCde8b16c2b,
1528 ABcde8b8a = dnnl_ABcde8b8a,
1529 aBCde8b8c = dnnl_aBCde8b8c,
1530 aBCde8b4c = dnnl_aBCde8b4c,
1531 ABcd4a8b8a4b = dnnl_ABcd4a8b8a4b,
1532 ABcd2a8b8a2b = dnnl_ABcd2a8b8a2b,
1533 aBCde4b8c8b4c = dnnl_aBCde4b8c8b4c,
1534 aBCde2b8c8b2c = dnnl_aBCde2b8c8b2c,
1535 aBCde8c16b2c = dnnl_aBCde8c16b2c,
1536 aBCde8c8b = dnnl_aBCde8c8b,
1538 aBCdef16b16c = dnnl_aBCdef16b16c,
1539 aBCdef16c16b = dnnl_aBCdef16c16b,
1542 aBCdef4c4b = dnnl_aBCdef4c4b,
1543 aBCdef4b4c = dnnl_aBCdef4b4c,
1544 aBCdef8b8c = dnnl_aBCdef8b8c,
1545 aBCdef8b4c = dnnl_aBCdef8b4c,
1546 aBCdef8c16b2c = dnnl_aBCdef8c16b2c,
1547 aBCdef4c16b4c = dnnl_aBCdef4c16b4c,
1548 aBCdef8c8b = dnnl_aBCdef8c8b,
1549 aBdc16b = dnnl_aBdc16b,
1550 aBdc4b = dnnl_aBdc4b,
1551 aBdc8b = dnnl_aBdc8b,
1552 aBdec16b = dnnl_aBdec16b,
1553 aBdec4b = dnnl_aBdec4b,
1554 aBdec8b = dnnl_aBdec8b,
1555 aBdefc16b = dnnl_aBdefc16b,
1556 aCBdef16c16b = dnnl_aCBdef16c16b,
1557 aCBdef16b16c = dnnl_aCBdef16b16c,
1558 aBdefc4b = dnnl_aBdefc4b,
1559 aBdefc8b = dnnl_aBdefc8b,
1560 Acb16a = dnnl_Acb16a,
1563 aCBd16b16c = dnnl_aCBd16b16c,
1564 aCBd16c16b = dnnl_aCBd16c16b,
1565 aCBde16b16c = dnnl_aCBde16b16c,
1566 aCBde16c16b = dnnl_aCBde16c16b,
1567 Acdb16a = dnnl_Acdb16a,
1568 Acdb4a = dnnl_Acdb4a,
1569 Acdb8a = dnnl_Acdb8a,
1570 Acdeb16a = dnnl_Acdeb16a,
1571 Acdeb4a = dnnl_Acdeb4a,
1572 Acdeb8a = dnnl_Acdeb8a,
1573 BAc16a16b = dnnl_BAc16a16b,
1574 BAc16b16a = dnnl_BAc16b16a,
1575 BAcd16a16b = dnnl_BAcd16a16b,
1576 BAcd16b16a = dnnl_BAcd16b16a,
1577 ABcd32a32b = dnnl_ABcd32a32b,
1578 BAcde16b16a = dnnl_BAcde16b16a,
1579 BAcde16a16b = dnnl_BAcde16a16b,
1580 aBdec32b = dnnl_aBdec32b,
1581 Abcdef16a = dnnl_Abcdef16a,
1582 Abcdef32a = dnnl_Abcdef32a,
1583 Acdb32a = dnnl_Acdb32a,
1587 aBCd2c4b2c = dnnl_aBCd2c4b2c,
1588 aBCde2c4b2c = dnnl_aBCde2c4b2c,
1589 aBCdef2c4b2c = dnnl_aBCdef2c4b2c,
1590 aBCd4b8c2b = dnnl_aBCd4b8c2b,
1591 aBCde4b8c2b = dnnl_aBCde4b8c2b,
1592 aBCdef4b8c2b = dnnl_aBCdef4b8c2b,
1593 aBCd4c8b2c = dnnl_aBCd4c8b2c,
1594 aBCde4c8b2c = dnnl_aBCde4c8b2c,
1595 aBCdef4c8b2c = dnnl_aBCdef4c8b2c,
1596 AB32a32b8a4b = dnnl_AB32a32b8a4b,
1597 AB32a32b8a2b = dnnl_AB32a32b8a2b,
1598 AB8a4b = dnnl_AB8a4b,
1599 AB8a2b = dnnl_AB8a2b,
1600 abDc32d = dnnl_abDc32d,
1601 abDC32d4c = dnnl_abDC32d4c,
1602 abdEc32e = dnnl_abdEc32e,
1603 abdEC32e2c = dnnl_abdEC32e2c,
1604 abdEC32e4c = dnnl_abdEC32e4c,
1617 NCw16n16c = dnnl_NCw16n16c,
1618 NChw16n16c = dnnl_NChw16n16c,
1619 NCdhw16n16c = dnnl_NCdhw16n16c,
1620 NCdhw32n32c = dnnl_NCdhw32n32c,
1621 NChw32n32c = dnnl_NChw32n32c,
1622 IOhw16i16o = dnnl_IOhw16i16o,
1623 OI16i16o = dnnl_OI16i16o,
1624 OI16i32o = dnnl_OI16i32o,
1625 OI16i64o = dnnl_OI16i64o,
1626 OI8i16o2i = dnnl_OI8i16o2i,
1627 OI8i32o2i = dnnl_OI8i32o2i,
1628 OI8i64o2i = dnnl_OI8i64o2i,
1629 OI4i16o4i = dnnl_OI4i16o4i,
1630 OI4i32o4i = dnnl_OI4i32o4i,
1631 OI4i64o4i = dnnl_OI4i64o4i,
1632 Ohwi32o = dnnl_Ohwi32o,
1633 IOdhw16i16o = dnnl_IOdhw16i16o,
1634 gIOhw16i16o = dnnl_gIOhw16i16o,
1635 gOhwi32o = dnnl_gOhwi32o,
1636 Goidhw16g = dnnl_Goidhw16g,
1637 IOw16o16i = dnnl_IOw16o16i,
1638 OIw16i16o = dnnl_OIw16i16o,
1639 OIw16i32o = dnnl_OIw16i32o,
1640 OIw16i64o = dnnl_OIw16i64o,
1641 IOw16i16o = dnnl_IOw16i16o,
1642 gIOw16i16o = dnnl_gIOw16i16o,
1643 OIw16o16i = dnnl_OIw16o16i,
1644 Oiw16o = dnnl_Oiw16o,
1645 OIw4i16o4i = dnnl_OIw4i16o4i,
1646 OIw4i32o4i = dnnl_OIw4i32o4i,
1647 OIw4i64o4i = dnnl_OIw4i64o4i,
1648 OIw2i8o4i = dnnl_OIw2i8o4i,
1649 OIw4i4o = dnnl_OIw4i4o,
1650 OIw4o4i = dnnl_OIw4o4i,
1652 OIw8i16o2i = dnnl_OIw8i16o2i,
1653 OIw8i32o2i = dnnl_OIw8i32o2i,
1654 OIw8i64o2i = dnnl_OIw8i64o2i,
1655 OIw8i8o = dnnl_OIw8i8o,
1656 OIw8o16i2o = dnnl_OIw8o16i2o,
1657 OIw8o8i = dnnl_OIw8o8i,
1658 OIw8o4i = dnnl_OIw8o4i,
1659 Owi16o = dnnl_Owi16o,
1660 OwI16o2i = dnnl_OwI16o2i,
1663 IOhw16o16i = dnnl_IOhw16o16i,
1664 Ohwi16o = dnnl_Ohwi16o,
1665 OhwI16o2i = dnnl_OhwI16o2i,
1666 Ohwi4o = dnnl_Ohwi4o,
1667 Ohwi8o = dnnl_Ohwi8o,
1668 OIhw16i16o = dnnl_OIhw16i16o,
1669 OIhw16i32o = dnnl_OIhw16i32o,
1670 OIhw16i64o = dnnl_OIhw16i64o,
1671 OIhw16o16i = dnnl_OIhw16o16i,
1672 Oihw16o = dnnl_Oihw16o,
1673 OIhw4i16o4i = dnnl_OIhw4i16o4i,
1674 OIhw4i32o4i = dnnl_OIhw4i32o4i,
1675 OIhw4i64o4i = dnnl_OIhw4i64o4i,
1676 OIhw4i4o = dnnl_OIhw4i4o,
1677 OIhw4o4i = dnnl_OIhw4o4i,
1678 Oihw4o = dnnl_Oihw4o,
1679 OIhw8i16o2i = dnnl_OIhw8i16o2i,
1680 OIhw8i32o2i = dnnl_OIhw8i32o2i,
1681 OIhw8i64o2i = dnnl_OIhw8i64o2i,
1682 OIhw8i8o = dnnl_OIhw8i8o,
1683 OIhw8o16i2o = dnnl_OIhw8o16i2o,
1684 OIhw8o8i = dnnl_OIhw8o8i,
1685 OIhw8o4i = dnnl_OIhw8o4i,
1686 OIhw2i8o4i = dnnl_OIhw2i8o4i,
1687 IOdhw16o16i = dnnl_IOdhw16o16i,
1688 Odhwi16o = dnnl_Odhwi16o,
1689 OdhwI16o2i = dnnl_OdhwI16o2i,
1690 Odhwi4o = dnnl_Odhwi4o,
1691 Odhwi8o = dnnl_Odhwi8o,
1692 OIdhw16i16o = dnnl_OIdhw16i16o,
1693 OIdhw16i32o = dnnl_OIdhw16i32o,
1694 OIdhw16i64o = dnnl_OIdhw16i64o,
1695 OIdhw16o16i = dnnl_OIdhw16o16i,
1696 Oidhw16o = dnnl_Oidhw16o,
1697 OIdhw4i4o = dnnl_OIdhw4i4o,
1698 OIdhw4o4i = dnnl_OIdhw4o4i,
1699 Oidhw4o = dnnl_Oidhw4o,
1700 OIdhw8i16o2i = dnnl_OIdhw8i16o2i,
1701 OIdhw8i32o2i = dnnl_OIdhw8i32o2i,
1702 OIdhw8i64o2i = dnnl_OIdhw8i64o2i,
1703 OIdhw4i16o4i = dnnl_OIdhw4i16o4i,
1704 OIdhw4i32o4i = dnnl_OIdhw4i32o4i,
1705 OIdhw4i64o4i = dnnl_OIdhw4i64o4i,
1706 OIdhw2i8o4i = dnnl_OIdhw2i8o4i,
1707 OIdhw8i8o = dnnl_OIdhw8i8o,
1708 OIdhw8o8i = dnnl_OIdhw8o8i,
1709 OIdhw8o4i = dnnl_OIdhw8o4i,
1710 gIOw16o16i = dnnl_gIOw16o16i,
1711 gOIw16i16o = dnnl_gOIw16i16o,
1712 gOIw16o16i = dnnl_gOIw16o16i,
1713 gOiw16o = dnnl_gOiw16o,
1714 gOIw4i16o4i = dnnl_gOIw4i16o4i,
1715 gOIw2i8o4i = dnnl_gOIw2i8o4i,
1716 gOIw4i4o = dnnl_gOIw4i4o,
1717 gOIw4o4i = dnnl_gOIw4o4i,
1718 gOiw4o = dnnl_gOiw4o,
1719 gOIw8i16o2i = dnnl_gOIw8i16o2i,
1720 gOIw8i8o = dnnl_gOIw8i8o,
1721 gOIw8o16i2o = dnnl_gOIw8o16i2o,
1722 gOIw8o8i = dnnl_gOIw8o8i,
1723 gOIw8o4i = dnnl_gOIw8o4i,
1724 gOwi16o = dnnl_gOwi16o,
1725 gOwI16o2i = dnnl_gOwI16o2i,
1726 gOwi4o = dnnl_gOwi4o,
1727 gOwi8o = dnnl_gOwi8o,
1728 Goiw8g = dnnl_Goiw8g,
1729 Goiw16g = dnnl_Goiw16g,
1730 gIOhw16o16i = dnnl_gIOhw16o16i,
1731 gOhwi16o = dnnl_gOhwi16o,
1732 gOhwI16o2i = dnnl_gOhwI16o2i,
1733 gOhwi4o = dnnl_gOhwi4o,
1734 gOhwi8o = dnnl_gOhwi8o,
1735 Goihw16g = dnnl_Goihw16g,
1736 gOIhw16i16o = dnnl_gOIhw16i16o,
1737 gOIhw16o16i = dnnl_gOIhw16o16i,
1738 gOihw16o = dnnl_gOihw16o,
1739 gOIhw4i16o4i = dnnl_gOIhw4i16o4i,
1740 gOIhw2i8o4i = dnnl_gOIhw2i8o4i,
1741 gOIhw4i4o = dnnl_gOIhw4i4o,
1742 gOIhw4o4i = dnnl_gOIhw4o4i,
1743 gOihw4o = dnnl_gOihw4o,
1744 Goihw8g = dnnl_Goihw8g,
1745 gOIhw8i16o2i = dnnl_gOIhw8i16o2i,
1746 gOIhw8i8o = dnnl_gOIhw8i8o,
1747 gOIhw8o16i2o = dnnl_gOIhw8o16i2o,
1748 OIw4o8i8o4i = dnnl_OIw4o8i8o4i,
1749 OIdhw4o8i8o4i = dnnl_OIdhw4o8i8o4i,
1750 OIhw4o8i8o4i = dnnl_OIhw4o8i8o4i,
1751 OIhw2o8i8o2i = dnnl_OIhw2o8i8o2i,
1752 gOIw4o8i8o4i = dnnl_gOIw4o8i8o4i,
1753 gOIdhw4o8i8o4i = dnnl_gOIdhw4o8i8o4i,
1754 gOIhw4o8i8o4i = dnnl_gOIhw4o8i8o4i,
1755 gOIhw2o8i8o2i = dnnl_gOIhw2o8i8o2i,
1756 OIhw16i16o4i = dnnl_OIhw16i16o4i,
1757 OIhw16i16o2i = dnnl_OIhw16i16o2i,
1758 gOIhw16i16o4i = dnnl_gOIhw16i16o4i,
1759 gOIhw16i16o2i = dnnl_gOIhw16i16o2i,
1760 gOIhw8o8i = dnnl_gOIhw8o8i,
1761 gOIhw8o4i = dnnl_gOIhw8o4i,
1762 gIOdhw16i16o = dnnl_gIOdhw16i16o,
1763 gIOdhw16o16i = dnnl_gIOdhw16o16i,
1764 gOdhwi16o = dnnl_gOdhwi16o,
1765 gOdhwI16o2i = dnnl_gOdhwI16o2i,
1766 gOdhwi4o = dnnl_gOdhwi4o,
1767 gOdhwi8o = dnnl_gOdhwi8o,
1768 gOIdhw16i16o = dnnl_gOIdhw16i16o,
1769 gOIdhw16o16i = dnnl_gOIdhw16o16i,
1770 gOidhw16o = dnnl_gOidhw16o,
1771 gOIdhw4i4o = dnnl_gOIdhw4i4o,
1772 gOIdhw4o4i = dnnl_gOIdhw4o4i,
1773 gOidhw4o = dnnl_gOidhw4o,
1774 gOIdhw8i16o2i = dnnl_gOIdhw8i16o2i,
1775 gOIdhw4i16o4i = dnnl_gOIdhw4i16o4i,
1776 gOIdhw2i8o4i = dnnl_gOIdhw2i8o4i,
1777 gOIdhw8i8o = dnnl_gOIdhw8i8o,
1778 gOIdhw8o8i = dnnl_gOIdhw8o8i,
1779 gOIdhw8o4i = dnnl_gOIdhw8o4i,
1780 gOIw2i4o2i = dnnl_gOIw2i4o2i,
1781 gOIhw2i4o2i = dnnl_gOIhw2i4o2i,
1782 gOIdhw2i4o2i = dnnl_gOIdhw2i4o2i,
1783 gOIw2o4i2o = dnnl_gOIw2o4i2o,
1784 gOIhw2o4i2o = dnnl_gOIhw2o4i2o,
1785 gOIdhw2o4i2o = dnnl_gOIdhw2o4i2o,
1786 gOIw4i8o2i = dnnl_gOIw4i8o2i,
1787 gOIhw4i8o2i = dnnl_gOIhw4i8o2i,
1788 gOIdhw4i8o2i = dnnl_gOIdhw4i8o2i,
1789 gOIw4o8i2o = dnnl_gOIw4o8i2o,
1790 gOIhw4o8i2o = dnnl_gOIhw4o8i2o,
1791 gOIdhw4o8i2o = dnnl_gOIdhw4o8i2o,
1793 ldOI32o4i = abDC32d4c,
1794 ldgOi32o = abdEc32e,
1795 ldgOI32o2i = abdEC32e2c,
1796 ldgOI32o4i = abdEC32e4c,
1825 bool allow_empty =
false)
1827 validate_dims(adims);
1829 (
int)adims.size(), adims.data(),
convert_to_c(adata_type),
1833 "could not construct a memory descriptor using a " 1853 bool allow_empty =
false)
1855 validate_dims(adims);
1856 if (!strides.empty()) validate_dims(strides, (
int)adims.size());
1858 (
int)adims.size(), adims.data(),
convert_to_c(adata_type),
1859 strides.empty() ? nullptr : &strides[0]);
1862 "could not construct a memory descriptor using " 1883 bool allow_empty =
false)
const {
1884 validate_dims(adims, data.
ndims);
1885 validate_dims(offsets, data.
ndims);
1888 &sub_md, &data, adims.data(), offsets.data());
1891 return desc(sub_md);
1939 if (data.
ndims) validate_dims(adims, 1);
1942 &out_md, &data, (
int)adims.size(), adims.data());
1945 status,
"could not reshape a memory descriptor");
1946 return desc(out_md);
1987 bool allow_empty =
false)
const {
1988 validate_dims(permutation, data.
ndims);
1991 &out_md, &data, permutation.data());
1994 "could not permute axes of a memory descriptor");
1995 return desc(out_md);
2040 explicit operator bool()
const {
return data.
ndims != 0; }
2072 "could not create a memory object");
2089 "could not get a memory descriptor from a memory object");
2090 return desc(*cdesc);
2097 "could not get an engine from a memory object");
2098 return engine(c_engine,
true);
2108 "could not get a native handle from a memory object");
2143 "could not set native handle of a memory object");
2159 "could not set native handle of a memory object");
2183 template <
typename T =
void>
2187 "could not map memory object data");
2188 return static_cast<T *
>(mapped_ptr);
2203 "could not unmap memory object data");
2285 "post-ops index is out of range");
2322 "could not append a sum post-op");
2325 memory::convert_to_c(data_type)),
2326 "could not append a sum post-op");
2335 "could not get parameters of a sum post-op");
2347 get(), index, &scale, &c_data_type),
2348 "could not get parameters of a sum post-op");
2366 float scale,
algorithm aalgorithm,
float alpha,
float beta) {
2369 "could not append an elementwise post-op");
2380 float &alpha,
float &beta)
const {
2383 get(), index, &scale, &c_alg, &alpha, &beta),
2384 "could not get parameters of an elementwise post-op");
2418 int mask,
const std::vector<float> &scales) {
2421 memory::convert_to_c(weights_data_type),
2422 memory::convert_to_c(bias_data_type),
2423 memory::convert_to_c(dst_data_type),
2424 scales.size(), mask, &scales[0]),
2425 "could not append depthwise post-op");
2444 int &mask, std::vector<float> &scales)
const {
2451 const float *c_scales;
2453 &c_weights_data_type, &c_bias_data_type,
2454 &c_dst_data_type, &count, &c_mask, &c_scales),
2455 "could not get parameters of depthwise post-op");
2460 scales.resize(count);
2464 scales[c] = c_scales[c];
2503 int mask,
const std::vector<float> &scales) {
2506 memory::convert_to_c(weights_data_type),
2507 memory::convert_to_c(bias_data_type),
2508 memory::convert_to_c(dst_data_type),
2509 scales.size(), mask, &scales[0]),
2510 "could not append depthwise post-op");
2529 int &mask, std::vector<float> &scales)
const {
2536 const float *c_scales;
2538 &c_weights_data_type, &c_bias_data_type,
2539 &c_dst_data_type, &count, &c_mask, &c_scales),
2540 "could not get parameters of depthwise post-op");
2545 scales.resize(count);
2549 scales[c] = c_scales[c];
2570 "could not append a binary post-op");
2584 "could not get parameters of a binary post-op");
2586 src1_desc.
data = *data;
2609 "could not create primitive attribute");
2626 "could not get scratchpad mode primitive attribute");
2636 "could not set scratchpad mode primitive attribute");
2651 const float *c_scales;
2653 get(), &count, &c_mask, &c_scales),
2654 "could not get output scales primitive attribute");
2655 scales.resize(count);
2659 scales[c] = c_scales[c];
2707 get(), (
dnnl_dim_t)scales.size(), mask, scales.data()),
2708 "could not set output scales primitive attribute");
2722 void get_scales(
int arg,
int &mask, std::vector<float> &scales)
const {
2725 const float *c_scales;
2727 get(), arg, &count, &c_mask, &c_scales),
2728 "could not get scales primitive attributes");
2729 scales.resize(count);
2733 scales[c] = c_scales[c];
2752 void set_scales(
int arg,
int mask,
const std::vector<float> &scales) {
2755 (
dnnl_dim_t)scales.size(), mask, scales.data()),
2756 "could not set scales primitive attribute");
2770 int arg,
int &mask, std::vector<int32_t> &zero_points)
const {
2773 const int32_t *c_zero_points;
2775 get(), arg, &count, &c_mask, &c_zero_points),
2776 "could not get zero points primitive attribute");
2777 zero_points.resize(count);
2781 zero_points[c] = c_zero_points[c];
2805 int arg,
int mask,
const std::vector<int32_t> &zero_points) {
2808 zero_points.data()),
2809 "could not set zero points primitive attribute");
2819 "could not get post-ops primitive attribute");
2820 result.
reset(const_cast<dnnl_post_ops_t>(c_result),
true);
2834 "could not set post-ops primitive attribute");
2873 "could not set RNN data quantization parameters primitive " 2887 float c_scale, c_shift;
2889 get(), &c_scale, &c_shift),
2890 "could not set RNN data quantization parameters primitive " 2924 (
int)scales.size(), mask, scales.data()),
2925 "could not set RNN weights quantization parameters primitive " 2951 const float *c_scales;
2953 get(), &count, &c_mask, &c_scales),
2954 "could not get primitive RNN weights quantization " 2955 "parameters attributes");
2956 scales.resize(count);
2960 scales[c] = c_scales[c];
2990 int mask,
const std::vector<float> &scales) {
2993 get(), (
int)scales.size(), mask, scales.data()),
2994 "could not set primitive RNN weights projection quantization " 2995 "parameters attributes");
3018 int &mask, std::vector<float> &scales) {
3021 const float *c_scales;
3024 get(), &count, &c_mask, &c_scales),
3025 "could not get primitive RNN weights projection quantization " 3026 "parameters attributes");
3027 scales.resize(count);
3031 scales[c] = c_scales[c];
3057 "could not retrieve implementation info string from a " 3058 "primitive descriptor");
3091 if (!std::any_of(valid_q.cbegin(), valid_q.cend(),
3092 [=](
query q) {
return what == q; }))
3094 "memory descriptor query is invalid");
3218 "could not retrieve scratchpad engine from a primitive " 3220 return engine(c_engine,
true);
3228 "could not get attributes from a primitive descriptor");
3231 "could not clone primitive attributes");
3241 "could not get primitive kind from a primitive descriptor");
3252 "could not clone a primitive descriptor");
3305 if (pd ==
nullptr)
return;
3318 rc,
"could not get primitive kind from a primitive descriptor");
3319 if (pd_kind != c_prim_kind)
3321 "primitive descriptor operation kind mismatch");
3331 "could not get propagation kind from the primitive " 3337 && (pd_prop_kind == c_prop_kind1
3338 || pd_prop_kind == c_prop_kind2))) {
3345 "primitive descriptor propagation kind mismatch");
3391 bool allow_empty =
false) {
3395 dst_engine.
get(), attr.get());
3398 "could not create a primitive descriptor for a reorder " 3416 bool allow_empty =
false) {
3425 "could not create a primitive descriptor for a reorder " 3499 const std::vector<memory::desc> &mems) {
3500 std::vector<dnnl_memory_desc_t> c_mems;
3501 c_mems.reserve(mems.size());
3502 for (
const auto &s : mems)
3503 c_mems.push_back(s.data);
3528 const std::vector<memory::desc> &srcs,
const engine &aengine,
3535 (
int)c_srcs.size(), concat_dimension, c_srcs.data(),
3536 attr.get(), aengine.
get()),
3537 "could not create a primitive descriptor for a concat " 3555 const std::vector<memory::desc> &srcs,
const engine &aengine,
3562 (
int)c_api_srcs.size(), concat_dimension,
3563 c_api_srcs.data(), attr.get(), aengine.
get()),
3564 "could not create a primitive descriptor for a concat " 3619 const std::vector<float> &scales,
3620 const std::vector<memory::desc> &srcs,
const engine &aengine,
3622 validate_container_size(scales,
3623 "counts of scales and sources are not equal",
3624 (
int)srcs.size(), (int)srcs.size());
3631 (
int)c_api_srcs.size(), scales.data(),
3632 c_api_srcs.data(), attr.get(), aengine.
get()),
3633 "could not create a primitive descriptor for a sum " 3649 const std::vector<memory::desc> &srcs,
const engine &aengine,
3651 validate_container_size(scales,
3652 "counts of scales and sources are not equal",
3653 (
int)srcs.size(), (int)srcs.size());
3659 (
int)c_api_srcs.size(), scales.data(),
3660 c_api_srcs.data(), attr.get(), aengine.
get()),
3661 "could not create a primitive descriptor for a sum " 3724 bool allow_empty =
false)
3725 : allow_empty_(allow_empty) {
3728 desc, attr ? attr->
get() :
nullptr, aengine.
get(), hint_fwd_pd);
3731 status,
"could not create a primitive descriptor iterator");
3732 pd_iterator.reset(iterator);
3745 status,
"could not advance a primitive descriptor iterator");
3751 bool allow_empty_ =
false;
3755 pd_iterator.
get(allow_empty_));
3758 "could not fetch a primitive descriptor from a primitive " 3759 "descriptor iterator");
3825 &strides[0], &padding_l[0], &padding_r[0]),
3826 "could not create a descriptor for a convolution forward " 3827 "propagation primitive");
3869 &weights_desc.
data,
nullptr, &dst_desc.
data,
3870 &strides[0], &padding_l[0], &padding_r[0]),
3871 "could not create a descriptor for a convolution forward " 3872 "propagation primitive");
3919 &weights_desc.
data, &bias_desc.
data,
3920 &dst_desc.
data, &strides[0], &dilates[0],
3921 &padding_l[0], &padding_r[0]),
3922 "could not create a descriptor for a dilated convolution " 3923 "forward propagation primitive");
3968 &weights_desc.
data,
nullptr,
3969 &dst_desc.
data, &strides[0], &dilates[0],
3970 &padding_l[0], &padding_r[0]),
3971 "could not create a descriptor for a dilated convolution " 3972 "forward propagation primitive");
3992 bool allow_empty =
false)
3994 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
4008 const engine &aengine,
bool allow_empty =
false)
4010 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
4090 &weights_desc.
data, &diff_dst_desc.
data,
4091 &strides[0], &padding_l[0], &padding_r[0]),
4092 "could not create a descriptor for a convolution backward " 4093 "propagation primitive");
4135 &weights_desc.
data, &diff_dst_desc.
data,
4136 &strides[0], &dilates[0], &padding_l[0],
4138 "could not create a descriptor for a dilated convolution " 4139 "backward propagation primitive");
4163 bool allow_empty =
false)
4165 hint_fwd_pd.
get(), allow_empty) {}
4184 bool allow_empty =
false)
4186 hint_fwd_pd.
get(), allow_empty) {}
4261 &diff_weights_desc.
data, &diff_bias_desc.
data,
4262 &diff_dst_desc.
data, &strides[0], &padding_l[0],
4264 "could not create a descriptor for a convolution weights " 4265 "update primitive");
4302 &diff_weights_desc.
data,
nullptr,
4303 &diff_dst_desc.
data, &strides[0],
4304 &padding_l[0], &padding_r[0]),
4305 "could not create a descriptor for a convolution weights " 4306 "update primitive");
4351 &diff_weights_desc.
data, &diff_bias_desc.
data,
4352 &diff_dst_desc.
data, &strides[0], &dilates[0],
4353 &padding_l[0], &padding_r[0]),
4354 "could not create a descriptor for a dilated convolution " 4355 "weights gradient primitive");
4397 &diff_weights_desc.
data,
nullptr,
4398 &diff_dst_desc.
data, &strides[0], &dilates[0],
4399 &padding_l[0], &padding_r[0]),
4400 "could not create a descriptor for a dilated convolution " 4401 "weights gradient primitive");
4424 bool allow_empty =
false)
4426 hint_fwd_pd.
get(), allow_empty) {}
4444 bool allow_empty =
false)
4446 hint_fwd_pd.
get(), allow_empty) {}
4545 &strides[0], &padding_l[0], &padding_r[0]),
4546 "could not create a descriptor for a deconvolution forward " 4547 "propagation primitive");
4588 &weights_desc.
data,
nullptr, &dst_desc.
data,
4589 &strides[0], &padding_l[0], &padding_r[0]),
4590 "could not create a descriptor for a deconvolution forward " 4591 "propagation primitive");
4637 &weights_desc.
data, &bias_desc.
data,
4638 &dst_desc.
data, &strides[0], &dilates[0],
4639 &padding_l[0], &padding_r[0]),
4640 "could not create a descriptor for a dilated deconvolution " 4641 "forward propagation primitive");
4685 &weights_desc.
data,
nullptr,
4686 &dst_desc.
data, &strides[0], &dilates[0],
4687 &padding_l[0], &padding_r[0]),
4688 "could not create a descriptor for a dilated deconvolution " 4689 "forward propagation primitive");
4709 bool allow_empty =
false)
4711 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
4725 const engine &aengine,
bool allow_empty =
false)
4727 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
4802 &weights_desc.
data, &diff_dst_desc.
data,
4803 &strides[0], &padding_l[0], &padding_r[0]),
4804 "could not create a descriptor for a deconvolution " 4805 "backward propagation primitive");
4846 &weights_desc.
data, &diff_dst_desc.
data,
4847 &strides[0], &dilates[0], &padding_l[0],
4849 "could not create a descriptor for a dilated deconvolution " 4850 "backward propagation primitive");
4874 bool allow_empty =
false)
4876 hint_fwd_pd.
get(), allow_empty) {}
4895 bool allow_empty =
false)
4897 hint_fwd_pd.
get(), allow_empty) {}
4971 &diff_weights_desc.
data, &diff_bias_desc.
data,
4972 &diff_dst_desc.
data, &strides[0], &padding_l[0],
4974 "could not create a descriptor for a deconvolution weights " 4975 "update primitive");
5011 &src_desc.
data, &diff_weights_desc.
data,
5012 nullptr, &diff_dst_desc.
data, &strides[0],
5013 &padding_l[0], &padding_r[0]),
5014 "could not create a descriptor for a deconvolution weights " 5015 "update primitive");
5059 &diff_weights_desc.
data, &diff_bias_desc.
data,
5060 &diff_dst_desc.
data, &strides[0], &dilates[0],
5061 &padding_l[0], &padding_r[0]),
5062 "could not create a descriptor for a dilated deconvolution " 5063 "weights gradient primitive");
5104 &diff_weights_desc.
data,
nullptr,
5105 &diff_dst_desc.
data, &strides[0], &dilates[0],
5106 &padding_l[0], &padding_r[0]),
5107 "could not create a descriptor for a dilated deconvolution " 5108 "weights gradient primitive");
5132 bool allow_empty =
false)
5134 hint_fwd_pd.
get(), allow_empty) {}
5153 bool allow_empty =
false)
5155 hint_fwd_pd.
get(), allow_empty) {}
5225 float alpha,
float beta,
float k = 1.f) {
5229 local_size, alpha, beta, k),
5230 "could not create a descriptor for a lrn forward " 5231 "propagation primitive");
5250 bool allow_empty =
false)
5252 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
5265 const engine &aengine,
bool allow_empty =
false)
5267 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
5319 float alpha,
float beta,
float k = 1.f) {
5322 &diff_data_desc.
data, &data_desc.
data, local_size,
5324 "could not create a descriptor for a lrn backward " 5325 "propagation primitive");
5348 bool allow_empty =
false)
5350 hint_fwd_pd.
get(), allow_empty) {}
5368 bool allow_empty =
false)
5370 hint_fwd_pd.
get(), allow_empty) {}
5452 &dst_desc.
data, &strides[0], &kernel[0],
5453 &padding_l[0], &padding_r[0]),
5454 "could not create a descriptor for a pooling forward " 5455 "propagation primitive");
5474 bool allow_empty =
false)
5476 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
5489 const engine &aengine,
bool allow_empty =
false)
5491 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
5561 &diff_dst_desc.
data, &strides[0], &kernel[0],
5562 &padding_l[0], &padding_r[0]),
5563 "could not create a descriptor for a pooling backward " 5564 "propagation primitive");
5587 bool allow_empty =
false)
5589 hint_fwd_pd.
get(), allow_empty) {}
5607 bool allow_empty =
false)
5609 hint_fwd_pd.
get(), allow_empty) {}
5687 &data_desc.
data, alpha, beta),
5688 "could not create a descriptor for an eltwise forward " 5689 "propagation primitive");
5709 bool allow_empty =
false)
5711 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
5725 const engine &aengine,
bool allow_empty =
false)
5727 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
5779 &diff_data_desc.
data, &data_desc.
data, alpha, beta),
5780 "could not create a descriptor for an eltwise backward " 5781 "propagation primitive");
5805 bool allow_empty =
false)
5807 hint_fwd_pd.
get(), allow_empty) {}
5826 bool allow_empty =
false)
5828 hint_fwd_pd.
get(), allow_empty) {}
5890 &data_desc.
data, softmax_axis),
5891 "could not create a descriptor for a softmax forward " 5892 "propagation primitive");
5912 bool allow_empty =
false)
5914 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
5928 const engine &aengine,
bool allow_empty =
false)
5930 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
5979 &data_desc.
data, softmax_axis),
5980 "could not create a descriptor for a softmax backward " 5981 "propagation primitive");
6005 bool allow_empty =
false)
6007 hint_fwd_pd.
get(), allow_empty) {}
6026 bool allow_empty =
false)
6028 hint_fwd_pd.
get(), allow_empty) {}
6087 int logsoftmax_axis) {
6090 &data_desc.
data, logsoftmax_axis),
6091 "could not create a descriptor for a logsoftmax forward " 6092 "propagation primitive");
6112 bool allow_empty =
false)
6114 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
6128 const engine &aengine,
bool allow_empty =
false)
6130 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
6180 int logsoftmax_axis) {
6182 &diff_data_desc.
data, &data_desc.
data,
6184 "could not create a descriptor for a logsoftmax backward " 6185 "propagation primitive");
6209 bool allow_empty =
false)
6211 hint_fwd_pd.
get(), allow_empty) {}
6230 bool allow_empty =
false)
6232 hint_fwd_pd.
get(), allow_empty) {}
6315 "could not create a descriptor for a batch normalization " 6316 "forward propagation primitive");
6337 bool allow_empty =
false)
6339 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
6353 const engine &aengine,
bool allow_empty =
false)
6355 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
6400 "could not retrieve a descriptor from a primitive " 6401 "descriptor for batch normalization forward propagation " 6441 &diff_data_desc.
data, &data_desc.
data,
6443 "could not create a descriptor for a batch normalization " 6444 "backward propagation primitive");
6469 bool allow_empty =
false)
6471 hint_fwd_pd.
get(), allow_empty) {}
6490 bool allow_empty =
false)
6492 hint_fwd_pd.
get(), allow_empty) {}
6595 "could not create a descriptor for a layer normalization " 6596 "forward propagation primitive");
6615 "could not create a descriptor for a layer normalization " 6616 "forward propagation primitive");
6637 bool allow_empty =
false)
6639 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
6653 const engine &aengine,
bool allow_empty =
false)
6655 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
6698 "could not retrieve a descriptor from a primitive " 6699 "descriptor for layer normalization forward propagation " 6741 &diff_data_desc.
data, &data_desc.
data,
6743 "could not create a descriptor for a batch normalization " 6744 "backward propagation primitive");
6764 &diff_data_desc.
data, &data_desc.
data,
6766 "could not create a descriptor for a batch normalization " 6767 "backward propagation primitive");
6792 bool allow_empty =
false)
6794 hint_fwd_pd.
get(), allow_empty) {}
6813 bool allow_empty =
false)
6815 hint_fwd_pd.
get(), allow_empty) {}
6905 &src_desc.
data, &weights_desc.
data,
6907 "could not create a descriptor for an inner product " 6908 "forward propagation primitive");
6930 &weights_desc.
data,
nullptr, &dst_desc.
data),
6931 "could not create a descriptor for an inner product " 6932 "forward propagation primitive");
6952 bool allow_empty =
false)
6954 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
6968 const engine &aengine,
bool allow_empty =
false)
6970 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
7025 &diff_src_desc.
data, &weights_desc.
data,
7026 &diff_dst_desc.
data),
7027 "could not create a descriptor for an inner product " 7028 "backward propagation primitive");
7053 bool allow_empty =
false)
7055 hint_fwd_pd.
get(), allow_empty) {}
7074 bool allow_empty =
false)
7076 hint_fwd_pd.
get(), allow_empty) {}
7130 &src_desc.
data, &diff_weights_desc.
data,
7131 &diff_bias_desc.
data, &diff_dst_desc.
data),
7132 "could not create a descriptor for an inner product " 7133 "weights gradient primitive");
7151 &src_desc.
data, &diff_weights_desc.
data,
nullptr,
7152 &diff_dst_desc.
data),
7153 "could not create a descriptor for an inner product " 7154 "weights gradient primitive");
7178 bool allow_empty =
false)
7180 hint_fwd_pd.
get(), allow_empty) {}
7199 bool allow_empty =
false)
7201 hint_fwd_pd.
get(), allow_empty) {}
7251 using primitive_desc::primitive_desc;
7435 "could not retrieve a descriptor from a primitive descriptor " 7436 "for an RNN primitive");
7443 && (
rnn_d->prop_kind == c_prop_kind1
7444 ||
rnn_d->prop_kind == c_prop_kind2)
7445 &&
rnn_d->cell_kind == c_cell_kind;
7449 "mismatch between expected and provided descriptors for an " 7511 float beta = 0.0f) {
7517 &src_iter_desc.
data, &weights_layer_desc.
data,
7518 &weights_iter_desc.
data, &bias_desc.
data,
7519 &dst_layer_desc.
data, &dst_iter_desc.
data,
7521 "could not create a descriptor for a vanilla RNN forward " 7522 "propagation primitive");
7542 bool allow_empty =
false)
7544 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
7558 const engine &aengine,
bool allow_empty =
false)
7560 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
7691 float beta = 0.0f) {
7697 &src_iter_desc.
data, &weights_layer_desc.
data,
7698 &weights_iter_desc.
data, &bias_desc.
data,
7699 &dst_layer_desc.
data, &dst_iter_desc.
data,
7700 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
7701 &diff_weights_layer_desc.
data,
7702 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
7703 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
7705 "could not create a descriptor for a vanilla RNN backward " 7706 "propagation primitive");
7730 bool allow_empty =
false)
7732 hint_fwd_pd.
get(), allow_empty) {}
7751 bool allow_empty =
false)
7753 hint_fwd_pd.
get(), allow_empty) {}
7915 &src_iter_desc.
data, &src_iter_c_desc.
data,
7916 &weights_layer_desc.
data, &weights_iter_desc.
data,
7917 &weights_peephole_desc.
data,
7918 &weights_projection_desc.
data, &bias_desc.
data,
7919 &dst_layer_desc.
data, &dst_iter_desc.
data,
7921 "could not create a descriptor for an LSTM forward " 7922 "propagation primitive");
7982 &src_iter_desc.
data, &src_iter_c_desc.
data,
7983 &weights_layer_desc.
data, &weights_iter_desc.
data,
7984 &weights_peephole_desc.
data, &bias_desc.
data,
7985 &dst_layer_desc.
data, &dst_iter_desc.
data,
7987 "could not create a descriptor for an LSTM forward " 7988 "propagation primitive");
8042 &src_iter_desc.
data, &src_iter_c_desc.
data,
8043 &weights_layer_desc.
data, &weights_iter_desc.
data,
8044 &bias_desc.
data, &dst_layer_desc.
data,
8045 &dst_iter_desc.
data, &dst_iter_c_desc.
data,
8047 "could not create a descriptor for an LSTM forward " 8048 "propagation primitive");
8067 bool allow_empty =
false)
8069 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
8082 const engine &aengine,
bool allow_empty =
false)
8084 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
8270 &src_iter_desc.
data, &src_iter_c_desc.
data,
8271 &weights_layer_desc.
data, &weights_iter_desc.
data,
8272 &weights_peephole_desc.
data,
8273 &weights_projection_desc.
data, &bias_desc.
data,
8274 &dst_layer_desc.
data, &dst_iter_desc.
data,
8275 &dst_iter_c_desc.
data, &diff_src_layer_desc.
data,
8276 &diff_src_iter_desc.
data,
8277 &diff_src_iter_c_desc.
data,
8278 &diff_weights_layer_desc.
data,
8279 &diff_weights_iter_desc.
data,
8280 &diff_weights_peephole_desc.
data,
8281 &diff_weights_projection_desc.
data,
8282 &diff_bias_desc.
data, &diff_dst_layer_desc.
data,
8283 &diff_dst_iter_desc.
data,
8284 &diff_dst_iter_c_desc.
data,
8286 "could not create a descriptor for an LSTM backward " 8287 "propagation primitive");
8380 &src_iter_desc.
data, &src_iter_c_desc.
data,
8381 &weights_layer_desc.
data, &weights_iter_desc.
data,
8382 &weights_peephole_desc.
data, &bias_desc.
data,
8383 &dst_layer_desc.
data, &dst_iter_desc.
data,
8384 &dst_iter_c_desc.
data, &diff_src_layer_desc.
data,
8385 &diff_src_iter_desc.
data,
8386 &diff_src_iter_c_desc.
data,
8387 &diff_weights_layer_desc.
data,
8388 &diff_weights_iter_desc.
data,
8389 &diff_weights_peephole_desc.
data,
8390 &diff_bias_desc.
data, &diff_dst_layer_desc.
data,
8391 &diff_dst_iter_desc.
data,
8392 &diff_dst_iter_c_desc.
data,
8394 "could not create a descriptor for an LSTM backward " 8395 "propagation primitive");
8477 &src_iter_desc.
data, &src_iter_c_desc.
data,
8478 &weights_layer_desc.
data, &weights_iter_desc.
data,
8479 &bias_desc.
data, &dst_layer_desc.
data,
8480 &dst_iter_desc.
data, &dst_iter_c_desc.
data,
8481 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
8482 &diff_src_iter_c_desc.
data,
8483 &diff_weights_layer_desc.
data,
8484 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
8485 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
8486 &diff_dst_iter_c_desc.
data,
8488 "could not create a descriptor for an LSTM backward " 8489 "propagation primitive");
8512 bool allow_empty =
false)
8514 hint_fwd_pd.
get(), allow_empty) {}
8532 bool allow_empty =
false)
8534 hint_fwd_pd.
get(), allow_empty) {}
8716 &src_iter_desc.
data, &weights_layer_desc.
data,
8717 &weights_iter_desc.
data, &bias_desc.
data,
8718 &dst_layer_desc.
data, &dst_iter_desc.
data,
8720 "could not create a descriptor for a GRU forward " 8721 "propagation primitive");
8740 bool allow_empty =
false)
8742 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
8755 const engine &aengine,
bool allow_empty =
false)
8757 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
8884 &src_iter_desc.
data, &weights_layer_desc.
data,
8885 &weights_iter_desc.
data, &bias_desc.
data,
8886 &dst_layer_desc.
data, &dst_iter_desc.
data,
8887 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
8888 &diff_weights_layer_desc.
data,
8889 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
8890 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
8892 "could not create a descriptor for a GRU backward " 8893 "propagation primitive");
8916 bool allow_empty =
false)
8918 hint_fwd_pd.
get(), allow_empty) {}
8936 bool allow_empty =
false)
8938 hint_fwd_pd.
get(), allow_empty) {}
9081 &src_iter_desc.
data, &weights_layer_desc.
data,
9082 &weights_iter_desc.
data, &bias_desc.
data,
9083 &dst_layer_desc.
data, &dst_iter_desc.
data,
9085 "could not create a descriptor for an LBR GRU forward " 9086 "propagation primitive");
9106 bool allow_empty =
false)
9108 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
9122 const engine &aengine,
bool allow_empty =
false)
9124 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
9252 &src_iter_desc.
data, &weights_layer_desc.
data,
9253 &weights_iter_desc.
data, &bias_desc.
data,
9254 &dst_layer_desc.
data, &dst_iter_desc.
data,
9255 &diff_src_layer_desc.
data, &diff_src_iter_desc.
data,
9256 &diff_weights_layer_desc.
data,
9257 &diff_weights_iter_desc.
data, &diff_bias_desc.
data,
9258 &diff_dst_layer_desc.
data, &diff_dst_iter_desc.
data,
9260 "could not create a descriptor for an LBR GRU backward " 9261 "propagation primitive");
9285 bool allow_empty =
false)
9287 hint_fwd_pd.
get(), allow_empty) {}
9306 bool allow_empty =
false)
9308 hint_fwd_pd.
get(), allow_empty) {}
9428 &data_desc.
data, axis, group_size),
9429 "could not create a descriptor for a shuffle forward " 9430 "propagation primitive");
9452 bool allow_empty =
false)
9454 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
9499 &diff_data_desc.
data, axis, group_size),
9500 "could not create a descriptor for a shuffle backward " 9501 "propagation primitive");
9527 bool allow_empty =
false)
9529 hint_fwd_pd.
get(), allow_empty) {}
9589 "could not create a descriptor for a binary operation " 9609 bool allow_empty =
false)
9611 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
9624 const engine &aengine,
bool allow_empty =
false)
9626 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
9684 &weights_desc.
data,
nullptr, &dst_desc.
data),
9685 "could not create a descriptor for a matmul primitive");
9697 &weights_desc.
data, &bias_desc.
data,
9699 "could not create a descriptor for a matmul primitive");
9717 bool allow_empty =
false)
9719 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
9731 const engine &aengine,
bool allow_empty =
false)
9733 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
9806 "could not create a resampling forward descriptor");
9821 const std::vector<float> &factors,
9827 &src_desc.
data,
nullptr),
9828 "could not create a resampling forward descriptor");
9848 const std::vector<float> &factors,
const memory::desc &src_desc,
9850 if (!factors.empty())
9856 "could not create a resampling forward descriptor");
9876 bool allow_empty =
false)
9878 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
9892 const engine &aengine,
bool allow_empty =
false)
9894 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
9941 &diff_src_desc.
data, &diff_dst_desc.
data),
9942 "could not create a resampling backward data descriptor");
9957 if (!factors.empty())
9961 &diff_src_desc.
data, &diff_dst_desc.
data),
9962 "could not create a resampling backward data descriptor");
9986 bool allow_empty =
false)
9988 hint_fwd_pd.
get(), allow_empty) {}
10007 bool allow_empty =
false)
10009 hint_fwd_pd.
get(), allow_empty) {}
10095 &dst_desc.
data, &strides[0], &kernel[0],
10096 &dilation[0], &padding_l[0], &padding_r[0]),
10097 "could not create a descriptor for a pooling forward " 10098 "propagation primitive");
10118 bool allow_empty =
false)
10120 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
10134 const engine &aengine,
bool allow_empty =
false)
10136 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
10211 &diff_dst_desc.
data, &strides[0], &kernel[0],
10212 &dilation[0], &padding_l[0], &padding_r[0]),
10213 "could not create a descriptor for a pooling backward " 10214 "propagation primitive");
10239 bool allow_empty =
false)
10241 hint_fwd_pd.
get(), allow_empty) {}
10260 bool allow_empty =
false)
10262 hint_fwd_pd.
get(), allow_empty) {}
10310 dnnl_prelu_desc_t data;
10324 &data_desc.
data, &weight_desc.
data),
10325 "could not create a descriptor for a prelu forward " 10326 "propagation primitive");
10346 bool allow_empty =
false)
10348 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
10362 const engine &aengine,
bool allow_empty =
false)
10364 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
10397 dnnl_prelu_desc_t data;
10412 &weight_desc.
data, &diff_data_desc.
data,
10413 &diff_weights_desc.
data),
10414 "could not create a descriptor for a prelu backward " 10415 "propagation primitive");
10439 bool allow_empty =
false)
10441 hint_fwd_pd.
get(), allow_empty) {}
10460 bool allow_empty =
false)
10462 hint_fwd_pd.
get(), allow_empty) {}
10534 &src_desc.
data, &dst_desc.
data, p, eps),
10535 "could not create a reduction descriptor");
10553 bool allow_empty =
false)
10555 &adesc.data, nullptr, aengine, nullptr, allow_empty) {}
10567 const engine &aengine,
bool allow_empty =
false)
10569 &adesc.data, &attr, aengine, nullptr, allow_empty) {}
10677 return static_cast<status>(
10699 "could not get primitive cache capacity");
10706 "could not set primitive cache capacity");
10723 transa, transb, M, N, K, alpha, A, lda, B, ldb, beta, C, ldc));
10730 float beta, int32_t *C,
dnnl_dim_t ldc,
const int32_t *co) {
10732 K, alpha, A, lda, ao, B, ldb, bo, beta, C, ldc, co));
10739 float beta, int32_t *C,
dnnl_dim_t ldc,
const int32_t *co) {
10741 K, alpha, A, lda, ao, B, ldb, bo, beta, C, ldc, co));
10752 "could not create a primitive");
10758 inline void primitive::execute(
const stream &astream,
10759 const std::unordered_map<int, memory> &args)
const {
10760 std::vector<dnnl_exec_arg_t> c_args;
10761 c_args.reserve(args.size());
10762 for (
const auto &a : args)
10763 c_args.push_back({a.first, a.second.get(
true)});
10766 (int)c_args.size(), c_args.data()),
10767 "could not execute a primitive");
10772 #undef DNNL_DEFINE_BITMASK_OPS 10779 namespace dnnl = ::dnnl;
desc(prop_kind aprop_kind, const memory::desc &data_desc, float epsilon, normalization_flags flags)
Constructs a descriptor for layer normalization forward propagation primitive.
Definition: dnnl.hpp:6609
#define DNNL_ARG_WEIGHTS_PROJECTION
A special mnemonic for RNN weights applied to the projection weights.
Definition: dnnl_types.h:2179
Layer normalization forward propagation primitive.
Definition: dnnl.hpp:6572
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...
Reduction using sum.
Definition: dnnl_types.h:1054
pooling_v2_backward()=default
Default constructor. Produces an empty object.
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.
primitive_desc(const desc &adesc, const engine &aengine, 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:9524
A layer normalization primitive.
Definition: dnnl_types.h:914
desc(prop_kind aprop_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:6900
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.
plain 7D tensor
Definition: dnnl_types.h:184
deconvolution_forward(const primitive_desc &pd)
Constructs a deconvolution forward propagation primitive.
Definition: dnnl.hpp:4759
rnn_primitive_desc_base(dnnl_primitive_desc_t pd, dnnl::prop_kind aprop_kind, dnnl::algorithm cell_kind)
Constructs an RNN primitive descriptor base from a C API primitive descriptor while checking that it ...
Definition: dnnl.hpp:7263
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a reduction primitive from a C API primitive descriptor that mu...
Definition: dnnl.hpp:10575
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a matmul primitive.
Definition: dnnl.hpp:9716
destination grad. memory desc
Definition: dnnl_types.h:2394
void * get_data_handle() const
Returns the underlying memory buffer.
Definition: dnnl.hpp:2105
An element-wise primitive.
Definition: dnnl_types.h:904
flags
Stream flags. Can be combined using the bitwise OR operator.
Definition: dnnl.hpp:983
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:5171
Reduction using mean operation.
Primitive descriptor for a shuffle forward propagation primitive.
Definition: dnnl.hpp:9435
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a dilated convolution forward propagation primitive without bias...
Definition: dnnl.hpp:3956
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.
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for an inner product forward propagation primitive.
Definition: dnnl.hpp:6951
lrn_backward(const primitive_desc &pd)
Constructs an LRN backward propagation primitive.
Definition: dnnl.hpp:5398
Reduction using lp norm without final pth-root.
Definition: dnnl_types.h:1064
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:3434
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a softmax forward propagation primitive.
Definition: dnnl.hpp:5927
prop_kind
Propagation kind.
Definition: dnnl.hpp:435
engine get_engine() const
Returns the associated engine.
Definition: dnnl.hpp:1010
6D tensor blocked by 3rd dimension with block size 4
Definition: dnnl_types.h:391
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:7595
memory::desc diff_dst_desc(int idx) const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:3142
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:9743
memory::desc src_iter_c_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8555
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:2342
permuted 6D tensor
Definition: dnnl_types.h:195
A batch normalization primitive.
Definition: dnnl_types.h:912
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:7021
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7557
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:6044
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:4498
Eltwise: bounded_relu.
Definition: dnnl_types.h:969
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:9151
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5281
Undefined memory format tag.
Definition: dnnl_types.h:169
3D tensor blocked by 2nd dimension with block size 16
Definition: dnnl_types.h:231
shuffle_backward(const primitive_desc &pd)
Constructs a shuffle backward propagation primitive.
Definition: dnnl.hpp:9554
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:8646
Primitive descriptor for a pooling forward propagation primitive.
Definition: dnnl.hpp:5460
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for an inner product forward propagation primitive.
Definition: dnnl.hpp:6967
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:4194
Descriptor for a vanilla RNN backward propagation primitive.
Definition: dnnl.hpp:7620
CPU engine.
Definition: dnnl_types.h:1976
inner_product_backward_data()=default
Default constructor. Produces an empty object.
primitive_desc()=default
Default constructor. Produces an empty object.
Eltwise: ReLU (dst for backward)
Definition: dnnl_types.h:996
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:9471
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:2253
destination memory desc
Definition: dnnl_types.h:2393
Direct deconvolution.
Definition: dnnl_types.h:951
Elementwise: exponential linear unit (ELU)
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc()=default
Default constructor. Produces an empty object.
A descriptor for an RNN operation.
Definition: dnnl_types.h:1778
Descriptor for reduction.
Definition: dnnl.hpp:10507
The user manages the scratchpad allocation by querying and providing the scratchpad memory to primiti...
Definition: dnnl_types.h:2048
The operation failed due to an out-of-memory condition.
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:8565
layer normalization descriptor
Definition: dnnl_types.h:2376
gru_backward(const primitive_desc &pd)
Constructs a GRU backward propagation primitive.
Definition: dnnl.hpp:9026
memory::desc diff_weights_peephole_desc() const
Returns diff weights peephole memory descriptor.
Definition: dnnl.hpp:7373
Elementwise: erf-based gelu.
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a pooling v2 (dilated pooling) backward propagation primitive f...
Definition: dnnl.hpp:10271
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a reduction primitive.
Definition: dnnl.hpp:10566
A pooling version 2 primitive.
memory consumption – extra
Definition: dnnl_types.h:2349
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:7289
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:10736
dnnl_primitive_kind_t
Kinds of primitives.
Definition: dnnl_types.h:888
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:2442
Average pooling include padding.
desc(algorithm aalgorithm, const memory::desc &data_desc, const memory::desc &diff_data_desc, memory::dim local_size, float alpha, float beta, float k=1.f)
Constructs a descriptor for an LRN backward propagation primitive.
Definition: dnnl.hpp:5317
primitive_desc(const desc &adesc, const engine &aengine, 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:7051
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &kernel, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for pooling forward propagation primitive.
Definition: dnnl.hpp:5441
eltwise_forward()=default
Default constructor. Produces an empty object.
permuted 3D tensor
Definition: dnnl_types.h:203
Eltwise: linear.
Definition: dnnl_types.h:967
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:6500
A PReLU primitive.
Definition: dnnl_types.h:934
Primitive descriptor for a convolution backward propagation primitive.
Definition: dnnl.hpp:4144
softmax_backward(const primitive_desc &pd)
Constructs a softmax backward propagation primitive.
Definition: dnnl.hpp:6056
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:5284
Bidirectional execution of RNN primitive with concatenation of the results.
Primitive descriptor for a pooling backward propagation primitive.
Definition: dnnl.hpp:5569
desc(prop_kind aprop_kind, algorithm activation, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, rnn_flags flags=rnn_flags::undef, float alpha=0.0f, float beta=0.0f)
Constructs a descriptor for a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7502
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:10579
permuted 6D tensor
Definition: dnnl_types.h:199
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:8139
dnnl_status_t DNNL_API dnnl_post_ops_get_params_binary(const_dnnl_post_ops_t post_ops, int index, dnnl_alg_kind_t *alg_kind, const dnnl_memory_desc_t **src1_desc)
Returns the parameters of a binary post-op.
memory::desc weights_projection_desc() const
Returns weights projection memory descriptor.
Definition: dnnl.hpp:8575
prelu_forward(const primitive_desc &pd)
Constructs a prelu forward propagation primitive.
Definition: dnnl.hpp:10390
permuted 12D tensor
Definition: dnnl_types.h:222
Elementwise: logistic (dst for backward)
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:6845
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:7095
void set_scratchpad_mode(scratchpad_mode mode)
Sets scratchpad mode.
Definition: dnnl.hpp:2633
vanilla_rnn_backward()=default
Default constructor. Produces an empty object.
A resampling primitive.
Definition: dnnl_types.h:928
shuffle_forward(const primitive_desc &pd)
Constructs a shuffle forward propagation primitive.
Definition: dnnl.hpp:9480
logsoftmax_backward(const primitive_desc &pd)
Constructs a logsoftmax backward propagation primitive.
Definition: dnnl.hpp:6264
An opaque structure to describe a primitive.
GRU cell with linear before reset.
Definition: dnnl_types.h:1032
deconvolution_backward_weights(const primitive_desc &pd)
Constructs a deconvolution weights gradient primitive.
Definition: dnnl.hpp:5190
oneDNN namespace
Definition: dnnl.hpp:74
Descriptor for a convolution forward propagation primitive.
Definition: dnnl.hpp:3779
Any ISA (excepting those listed as initial support)
Definition: dnnl_types.h:2498
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:6522
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 the library can dispatch to on the CPU.
Definition: dnnl.hpp:10676
desc(algorithm aalgorithm, const memory::desc &diff_src_desc, const memory::desc &weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a deconvolution backward propagation primitive.
Definition: dnnl.hpp:4792
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:932
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8552
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:5365
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:10378
pooling_v2_forward()=default
Default constructor. Produces an empty object.
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:1869
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:7771
memory::desc bias_desc() const
Returns the bias memory descriptor.
Definition: dnnl.hpp:4036
memory::desc diff_weights_layer_desc() const
Returns diff weights layer memory descriptor.
Definition: dnnl.hpp:7361
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for an elementwise forward propagation primitive.
Definition: dnnl.hpp:5708
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:9334
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:5744
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:9326
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:4406
static size_t get_count(kind akind)
Returns the number of engines of a certain kind.
Definition: dnnl.hpp:887
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &diff_src_layer_desc, const memory::desc &diff_src_iter_desc, const memory::desc &diff_weights_layer_desc, const memory::desc &diff_weights_iter_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_layer_desc, const memory::desc &diff_dst_iter_desc, rnn_flags flags=rnn_flags::undef)
Constructs a descriptor for a GRU backward propagation primitive.
Definition: dnnl.hpp:8864
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:10478
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.
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:8933
#define DNNL_ARG_WEIGHTS_LAYER
A special mnemonic for RNN weights applied to the layer input.
Definition: dnnl_types.h:2161
Use no normalization flags.
Definition: dnnl_types.h:1079
scratchpad memory desc
Definition: dnnl_types.h:2396
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:8980
const void * const_dnnl_op_desc_t
A pointer to any of the operation descriptors (constant variant).
Definition: dnnl_types.h:1351
Intel Streaming SIMD Extensions 4.1 (Intel SSE4.1)
Definition: dnnl_types.h:2501
Eltwise: clip.
Definition: dnnl_types.h:988
reduction()=default
Default constructor. Produces an empty object.
inner_product_backward_data(const primitive_desc &pd)
Constructs an inner product backward propagation primitive.
Definition: dnnl.hpp:7104
Shuffle backward propagation primitive.
Definition: dnnl.hpp:9484
sum(const primitive_desc &pd)
Constructs a sum primitive.
Definition: dnnl.hpp:3685
Intel AVX-512, Intel DL Boost and bfloat16 support and Intel AMX with 8-bit integer and bfloat16 supp...
Definition: dnnl_types.h:2534
An opaque structure for primitive descriptor attributes.
reorder destination engine
primitive_desc_base(dnnl_primitive_desc_t pd, dnnl::primitive::kind prim_kind, dnnl::prop_kind aprop_kind)
Constructs a primitive descriptor base object from a clone of a C API primitive descriptor after veri...
Definition: dnnl.hpp:3284
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:9164
PReLU backward propagation primitive.
Definition: dnnl.hpp:10394
Deconvolution weights gradient primitive.
Definition: dnnl.hpp:4929
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:9739
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:7222
memory::desc diff_src_layer_desc() const
Returns diff source layer memory descriptor.
Definition: dnnl.hpp:8601
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:9468
gru_forward()=default
Default constructor. Produces an empty object.
logsoftmax descriptor
Definition: dnnl_types.h:2381
Backward propagation (with respect to all parameters).
kind
Kinds of primitives supported by the library.
Definition: dnnl.hpp:271
permuted 4D tensor
Definition: dnnl_types.h:200
void get_output_scales(int &mask, std::vector< float > &scales) const
Returns output scaling factors correspondence mask and values.
Definition: dnnl.hpp:2648
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &src_iter_c_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &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:7966
void append_eltwise(float scale, algorithm aalgorithm, float alpha, float beta)
Appends an elementwise post-op.
Definition: dnnl.hpp:2365
Use scale and shift parameters.
memory::desc diff_src_iter_desc() const
Returns diff source iteration memory descriptor.
Definition: dnnl.hpp:7349
desc(algorithm aalgorithm, const memory::desc &diff_src_desc, const memory::desc &weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a convolution backward propagation primitive.
Definition: dnnl.hpp:4080
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8103
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:4744
Primitive iterator passed over last primitive descriptor.
Definition: dnnl_types.h:49
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a convolution forward propagation primitive without bias.
Definition: dnnl.hpp:3858
plain 8D tensor
Definition: dnnl_types.h:185
memory::desc diff_bias_desc() const
Returns diff bias memory descriptor.
Definition: dnnl.hpp:7389
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.
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:4892
#define DNNL_ARG_DST_LAYER
A special mnemonic for RNN output vector. An alias for DNNL_ARG_DST_0.
Definition: dnnl_types.h:2137
Local response normalization (LRN) forward propagation primitive.
Definition: dnnl.hpp:5205
memory::desc src_desc(int idx) const
Returns a source memory descriptor.
Definition: dnnl.hpp:3106
An opaque structure to describe a memory.
void execute(const stream &astream, const std::unordered_map< int, memory > &args) const
Executes computations specified by the primitive in a specified stream.
Base class for primitive descriptors for RNN primitives.
Definition: dnnl.hpp:7250
void reset(T t, bool weak=false)
Resets the handle wrapper objects to wrap a new C API handle.
Definition: dnnl.hpp:176
Descriptor for an inner product backward propagation primitive.
Definition: dnnl.hpp:7008
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &dst_desc, float p, float eps)
Constructs a descriptor for a reduction primitive using algorithm specific parameters, source and destination memory descriptors.
Definition: dnnl.hpp:10530
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:9537
plain 11D tensor
Definition: dnnl_types.h:188
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &bias_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a convolution forward propagation primitive with bias.
Definition: dnnl.hpp:3812
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:6842
Elementwise: hyperbolic tangent non-linearity (tanh) (dst for backward)
Descriptor for a PReLU backward propagation primitive.
Definition: dnnl.hpp:10396
permuted 5D tensor
Definition: dnnl_types.h:201
dnnl_memory_desc_t data
The underlying C API data structure.
Definition: dnnl.hpp:1803
LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9182
Descriptor for a layer normalization forward propagation primitive.
Definition: dnnl.hpp:6574
dnnl_engine_kind_t
Kinds of engines.
Definition: dnnl_types.h:1972
struct dnnl_primitive_desc * dnnl_primitive_desc_t
A primitive descriptor handle.
Definition: dnnl_types.h:2015
Eltwise: square root (dst for backward)
Definition: dnnl_types.h:1002
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:5847
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:7582
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:4024
Pooling v2 (dilated pooling) backward propagation primitive.
Definition: dnnl.hpp:10171
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:5938
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:8797
batch_normalization_backward()=default
Default constructor. Produces an empty object.
dnnl_status_t DNNL_API dnnl_lstm_forward_desc_init_v3(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 *weights_projection_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 and with or without recurrent projecti...
Intel AVX-512 and Intel Deep Learning Boost (Intel DL Boost) support for Intel Xeon Scalable processo...
desc(algorithm aalgorithm, const memory::desc &src0, const memory::desc &src1, const memory::desc &dst)
Constructs a descriptor for an elementwise binary operator primitive.
Definition: dnnl.hpp:9584
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:10279
lbr_gru_forward()=default
Default constructor. Produces an empty object.
Primitive descriptor for a concat primitive.
Definition: dnnl.hpp:3511
memory::dims dims() const
Returns dimensions of the memory descriptor.
Definition: dnnl.hpp:2002
#define DNNL_ARG_SRC_LAYER
A special mnemonic for RNN input vector.
Definition: dnnl_types.h:2111
Elementwise: square root (dst for backward)
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:5975
Undefined primitive.
Definition: dnnl_types.h:890
Intel Advanced Vector Extensions 512 (Intel AVX-512) subset for Intel Xeon Phi processors x200 Series...
void set_post_ops(const post_ops ops)
Sets post-ops.
Definition: dnnl.hpp:2832
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &data_desc, float alpha=0, float beta=0)
Constructs a descriptor for an elementwise forward propagation primitive.
Definition: dnnl.hpp:5681
number of outputs expected
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:7603
primitive::kind kind(int index) const
Returns the primitive kind of post-op at entry with a certain index.
Definition: dnnl.hpp:2283
Unidirectional execution of RNN primitive from left to right.
Definition: dnnl_types.h:1764
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a PReLU forward propagation primitive.
Definition: dnnl.hpp:10345
primitive_desc(const desc &adesc, const engine &aengine, 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:4422
The library manages the scratchpad allocation according to the policy specified by the DNNL_ENABLE_CO...
Definition: dnnl_types.h:2043
memory::desc diff_src_layer_desc() const
Returns diff source layer memory descriptor.
Definition: dnnl.hpp:7341
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a layer normalization forward propagation primitive.
Definition: dnnl.hpp:6652
Descriptor for an inner product weights gradient primitive.
Definition: dnnl.hpp:7110
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:5508
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:239
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:6179
memory::desc weights_peephole_desc() const
Returns weights peephole memory descriptor.
Definition: dnnl.hpp:7301
batch normalization descriptor
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:8771
3D CNN activations tensor blocked by channels with block size 8, an alias to dnnl_aBc8b ...
Definition: dnnl_types.h:630
Intel AVX2 and Intel Deep Learning Boost (Intel DL Boost) support.
Definition: dnnl_types.h:2537
Nearest Neighbor resampling method.
memory::desc diff_weights_iter_desc() const
Returns diff weights iteration memory descriptor.
Definition: dnnl.hpp:8621
Intel AVX-512 subset for Intel Xeon Phi processors 7235, 7285, 7295 Series.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6151
dnnl_dims_t dims
Dimensions in the following order:
Definition: dnnl_types.h:1291
dnnl_status_t DNNL_API dnnl_stream_get_engine(const_dnnl_stream_t stream, dnnl_engine_t *engine)
Returns the engine of a stream object.
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:612
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:9156
binary descriptor
Definition: dnnl_types.h:2380
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a pooling forward propagation primitive.
Definition: dnnl.hpp:5488
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:6987
Elementwise: square root.
primitive_desc()=default
Default constructor. Produces an empty object.
The operation was successful.
permuted 4D tensor
Definition: dnnl_types.h:193
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:3186
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:9908
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:6252
Any ISA (excepting those listed as initial support)
Intel Streaming SIMD Extensions 4.1 (Intel SSE4.1)
Descriptor for a pooling forward propagation primitive.
Definition: dnnl.hpp:10052
desc(prop_kind aprop_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:6588
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:2167
Descriptor for a batch normalization backward propagation primitive.
Definition: dnnl.hpp:6421
desc(prop_kind aprop_kind, algorithm aalgorithm, 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:9800
memory::desc diff_weights_peephole_desc() const
Returns diff weights peephole memory descriptor.
Definition: dnnl.hpp:8626
memory::desc diff_dst_iter_desc() const
Returns diff destination iteration memory descriptor.
Definition: dnnl.hpp:7830
memory::desc diff_weights_layer_desc() const
Returns diff weights layer memory descriptor.
Definition: dnnl.hpp:8616
A descriptor of a pooling operation.
Definition: dnnl_types.h:1521
status set_jit_profiling_jitdumpdir(const std::string &dir)
Sets JIT dump output path.
Definition: dnnl.hpp:10645
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:1986
plain 2D tensor
Definition: dnnl_types.h:178
kind get_kind() const
Returns the kind of the engine.
Definition: dnnl.hpp:919
A memory descriptor.
Definition: dnnl.hpp:1800
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &src_iter_c_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &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:8354
permuted 5D tensor
Definition: dnnl_types.h:208
rnn_direction
A direction of RNN primitive execution.
Definition: dnnl.hpp:706
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:4030
destination gradient (diff) memory desc
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:8972
vanilla_rnn_forward()=default
Default constructor. Produces an empty object.
Undefined memory format kind, used for empty memory descriptors.
Definition: dnnl_types.h:82
GRU cell with linear before reset.
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, rnn_flags flags=rnn_flags::undef)
Constructs a descriptor for a GRU forward propagation primitive.
Definition: dnnl.hpp:8703
memory::desc diff_dst_iter_desc() const
Returns diff destination iteration memory descriptor.
Definition: dnnl.hpp:9015
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.
Reduction using lp norm without final pth-root.
Definition: dnnl_types.h:1066
32-bit signed integer.
Definition: dnnl_types.h:72
Bidirectional execution of RNN primitive with summation of the results.
Definition: dnnl_types.h:1772
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-op.
An inner product primitive.
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:8134
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5168
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:6148
primitive_desc(const desc &adesc, const engine &aengine, 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:6790
Direct convolution.
Definition: dnnl_types.h:945
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a batch normalization forward propagation primitive.
Definition: dnnl.hpp:6336
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:3162
memory::desc diff_weights_layer_desc() const
Returns diff weights layer memory descriptor.
Definition: dnnl.hpp:9365
dnnl_status_t DNNL_API dnnl_primitive_attr_get_rnn_data_qparams(const_dnnl_primitive_attr_t attr, float *scale, float *shift)
Returns the quantization scale and shift parameters for RNN data tensors.
desc submemory_desc(const dims &adims, const 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:1882
Just a sentinel, not real memory format tag.
Definition: dnnl_types.h:465
Primitive descriptor for an LRN forward propagation primitive.
Definition: dnnl.hpp:5236
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:7124
Descriptor for an LSTM forward propagation primitive.
Definition: dnnl.hpp:7847
5D tensor blocked by 1st dimension with block size 8
Definition: dnnl_types.h:329
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:8977
dnnl_primitive_kind_t convert_to_c(primitive::kind akind)
Converts primitive kind enum value from C++ API to C API type.
Definition: dnnl.hpp:364
An opaque structure to describe a primitive descriptor iterator.
eltwise_forward(const primitive_desc &pd)
Constructs an eltwise forward propagation primitive.
Definition: dnnl.hpp:5753
pooling descriptor
Definition: dnnl_types.h:2372
Convolution algorithm(either direct or Winograd) is chosen just in time.
Definition: dnnl_types.h:949
memory::desc diff_src_layer_desc() const
Returns diff source layer memory descriptor.
Definition: dnnl.hpp:9355
Reduction using mean.
Definition: dnnl_types.h:1058
Elementwise: bounded_relu.
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &bias_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a dilated convolution forward propagation primitive with bias...
Definition: dnnl.hpp:3907
Logsoftmax backward propagation primitive.
Definition: dnnl.hpp:6164
memory(const desc &md, const engine &aengine)
Constructs a memory object.
Definition: dnnl.hpp:2082
An execution engine.
Definition: dnnl.hpp:863
matmul(const primitive_desc &pd)
Constructs a matmul primitive.
Definition: dnnl.hpp:9764
void get_rnn_weights_projection_qparams(int &mask, std::vector< float > &scales)
Returns the quantization scaling factors for RNN projection weights tensors.
Definition: dnnl.hpp:3017
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &kernel, const memory::dims &dilation, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for pooling v2 (dilated pooling) forward propagation primitive.
Definition: dnnl.hpp:10081
dnnl_status_t DNNL_API dnnl_stream_create(dnnl_stream_t *stream, dnnl_engine_t engine, unsigned flags)
Creates an execution stream.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6249
GRU forward propagation primitive.
Definition: dnnl.hpp:8666
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:6622
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:4214
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 made to the previously mapped memory buffer...
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:3450
const char * impl_info_str() const
Returns implementation name.
Definition: dnnl.hpp:3053
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:9329
primitive_desc()=default
Default constructor. Produces an empty object.
void unmap_data(void *mapped_ptr) const
Unmaps a memory object and writes back any changes made to the previously mapped memory buffer...
Definition: dnnl.hpp:2201
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:8789
primitive_desc(const desc &adesc, const engine &aengine, 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:6207
Descriptor for an LRN backward propagation primitive.
Definition: dnnl.hpp:5302
Primitive descriptor for an inner product weights gradient primitive.
Definition: dnnl.hpp:7159
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:8800
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.
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &src_iter_c_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &weights_peephole_desc, const memory::desc &weights_projection_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_weights_projection_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 and with or without projection) descriptor for backward ...
Definition: dnnl.hpp:8242
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:9146
Unidirectional execution of RNN primitive from right to left.
Definition: dnnl_types.h:1766
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.
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &src_iter_c_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &dst_iter_c_desc, rnn_flags flags=rnn_flags::undef)
Constructs a descriptor for an LSTM forward propagation primitive.
Definition: dnnl.hpp:8027
A deconvolution primitive.
Definition: dnnl_types.h:902
Descriptor for an LRN forward propagation primitive.
Definition: dnnl.hpp:5207
A class that provides the destructor for a oneDNN C API handle.
Definition: dnnl.hpp:120
lstm_backward()=default
Default constructor. Produces an empty object.
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:7214
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:4018
LSTM backward propagation primitive.
Definition: dnnl.hpp:8162
engine(kind akind, size_t index)
Constructs an engine.
Definition: dnnl.hpp:896
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:7277
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:357
8-bit unsigned integer.
Definition: dnnl_types.h:76
A descriptor of a matrix multiplication operation.
Definition: dnnl_types.h:1886
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:4462
memory::desc mean_desc() const
Returns memory descriptor for mean.
Definition: dnnl.hpp:6682
Alias for dnnl::rnn_direction::unidirectional_left2right.
memory::desc src_desc(int idx=0) const
Returns a source memory descriptor.
Definition: dnnl.hpp:3674
deconvolution_backward_data()=default
Default constructor. Produces an empty object.
permuted 6D tensor
Definition: dnnl_types.h:214
primitive_desc()=default
Default constructor. Produces an empty object.
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:9342
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:4199
prelu_backward()=default
Default constructor. Produces an empty object.
memory::desc diff_bias_desc() const
Returns diff bias memory descriptor.
Definition: dnnl.hpp:7820
layer_normalization_forward(const primitive_desc &pd)
Constructs a layer normalization forward propagation primitive.
Definition: dnnl.hpp:6713
#define DNNL_ARG_DIFF_DST_ITER
A special mnemonic for gradient (diff) of RNN input recurrent hidden state vector.
Definition: dnnl_types.h:2229
dnnl_query_t
Primitive descriptor query specification.
Definition: dnnl_types.h:2339
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:6833
Intel Advanced Vector Extensions (Intel AVX)
Definition: dnnl_types.h:2504
Intel AVX-512 subset for Intel Xeon Phi processors 7235, 7285, 7295 Series.
Definition: dnnl_types.h:2515
Backward data propagation.
Definition: dnnl_types.h:879
Inner product forward propagation primitive.
Definition: dnnl.hpp:6881
Average pooling exclude padding.
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:5625
A descriptor of a binary operation.
Definition: dnnl_types.h:1860
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:7579
source gradient memory desc
Definition: dnnl_types.h:2390
plain 10D tensor
Definition: dnnl_types.h:187
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:8529
void execute(const stream &astream, memory &src, memory &dst) const
Executes the reorder primitive.
Definition: dnnl.hpp:3482
engine get_engine() const
Returns the engine of the primitive descriptor.
Definition: dnnl.hpp:3049
A binary primitive.
Definition: dnnl_types.h:922
Structure containing version information as per Semantic Versioning
Definition: dnnl_types.h:2466
Elementwise unary operation backward propagation primitive.
Definition: dnnl.hpp:5757
reduction descriptor
Definition: dnnl_types.h:2385
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a prelu forward propagation primitive from a C API primitive de...
Definition: dnnl.hpp:10372
desc(prop_kind aprop_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:6759
primitive_desc(const desc &adesc, const engine &aengine, 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:5585
deconvolution_backward_data(const primitive_desc &pd)
Constructs a deconvolution backward propagation primitive.
Definition: dnnl.hpp:4925
void set_rnn_data_qparams(float scale, float shift)
Sets quantization scale and shift parameters for RNN data tensors.
Definition: dnnl.hpp:2870
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:8547
4D tensor blocked by 2nd dimension with block size 32
Definition: dnnl_types.h:280
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:2208
primitive_desc()=default
Default constructor. Produces an empty object.
permuted 11D tensor
Definition: dnnl_types.h:221
LSTM cell.
Definition: dnnl_types.h:1022
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a pooling v2 (dilated pooling) forward propagation primitive...
Definition: dnnl.hpp:10133
memory::desc diff_bias_desc() const
Returns the diff bias memory descriptor.
Definition: dnnl.hpp:7225
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:2143
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:3573
Descriptor for an elementwise forward propagation primitive.
Definition: dnnl.hpp:5666
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:6240
4D tensor blocked by 2nd dimension with block size 16
Definition: dnnl_types.h:272
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:9350
desc()=default
Default constructor. Produces an empty object.
#define DNNL_ARG_SRC_ITER_C
A special mnemonic for RNN input recurrent cell state vector.
Definition: dnnl_types.h:2126
permuted 7D tensor
Definition: dnnl_types.h:217
Inner product weights gradient primitive.
Definition: dnnl.hpp:7108
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc diff_bias_desc() const
Returns the diff bias memory descriptor.
Definition: dnnl.hpp:5179
A reorder primitive.
Definition: dnnl_types.h:892
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:9756
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:9339
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.
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:6487
pooling_forward()=default
Default constructor. Produces an empty object.
A descriptor of a convolution operation.
Definition: dnnl_types.h:1363
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.
primitive_desc(const desc &adesc, const engine &aengine, 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:7728
memory::desc diff_weights_iter_desc() const
Returns diff weights iteration memory descriptor.
Definition: dnnl.hpp:7367
Descriptor for a resampling backward propagation primitive.
Definition: dnnl.hpp:9926
normalization_flags
Flags for normalization primitives.
Definition: dnnl.hpp:609
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:10625
softmax descriptor
Definition: dnnl_types.h:2371
permuted 5D tensor
Definition: dnnl_types.h:215
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:5275
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8956
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:8765
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 &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a deconvolution forward propagation primitive.
Definition: dnnl.hpp:4708
Elementwise: tanh-based gelu.
softmax_forward(const primitive_desc &pd)
Constructs a softmax forward propagation primitive.
Definition: dnnl.hpp:5956
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a logsoftmax forward propagation primitive. ...
Definition: dnnl.hpp:6127
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(), bool allow_empty=false)
Constructs a primitive descriptor for reorder primitive.
Definition: dnnl.hpp:3388
Intel AVX-512 subset for Intel Xeon Scalable processor family and Intel Core processor family...
Definition: dnnl_types.h:2519
format_kind
Memory format kind.
Definition: dnnl.hpp:1143
binary(const primitive_desc &pd)
Constructs an elementwise binary operation primitive.
Definition: dnnl.hpp:9654
no query
Definition: dnnl_types.h:2340
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:6984
dnnl_scratchpad_mode_t
Scratchpad mode.
Definition: dnnl_types.h:2026
Fuse with ReLU.
Definition: dnnl_types.h:1118
data_type
Data type specification.
Definition: dnnl.hpp:1124
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc weights_desc(int idx) const
Returns a weights memory descriptor.
Definition: dnnl.hpp:3124
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:8147
Primitive descriptor for a logsoftmax backward propagation primitive.
Definition: dnnl.hpp:6190
Forward data propagation (training mode).
batch normalization descriptor
Definition: dnnl_types.h:2375
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:7748
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:8560
A reduction primitive.
Definition: dnnl_types.h:932
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:3602
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:4735
memory::desc diff_weights_projection_desc() const
Returns diff weights projection memory descriptor.
Definition: dnnl.hpp:8631
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:10282
memory::desc weights_peephole_desc() const
Returns weights peephole memory descriptor.
Definition: dnnl.hpp:8121
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:9911
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:8959
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:9347
runtime estimation (seconds)
Definition: dnnl_types.h:2348
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:10481
Backward propagation (with respect to all parameters).
Definition: dnnl_types.h:877
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:10025
An unspecified engine.
Definition: dnnl_types.h:1974
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:9462
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:3670
Backward weights propagation.
eltwise_backward()=default
Default constructor. Produces an empty object.
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:8776
gru_forward(const primitive_desc &pd)
Constructs a GRU forward propagation primitive.
Definition: dnnl.hpp:8811
5D tensor blocked by 1st dimension with block size 16
Definition: dnnl_types.h:325
Eltwise: ReLU.
Definition: dnnl_types.h:955
memory::desc diff_weights_desc(int idx) const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:3151
Descriptor for an LBR GRU forward propagation primitive.
Definition: dnnl.hpp:9032
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:1978
Reduction using norm_lp_sum operation.
Local response normalization (LRN) across multiple channels.
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:10475
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.
desc(algorithm aalgorithm, const memory::desc &diff_src_desc, const memory::desc &weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a dilated deconvolution backward propagation primitive.
Definition: dnnl.hpp:4834
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:7089
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:6290
Convolution forward propagation primitive.
Definition: dnnl.hpp:3777
primitive_desc()=default
Default constructor. Produces an empty object.
Primitive descriptor for a deconvolution weights gradient primitive.
Definition: dnnl.hpp:5113
memory::desc mean_desc() const
Returns memory descriptor for mean.
Definition: dnnl.hpp:6527
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:5628
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:6519
inner_product_forward(const primitive_desc &pd)
Constructs an inner product forward propagation primitive.
Definition: dnnl.hpp:7002
Use no normalization flags.
vanilla_rnn_forward(const primitive_desc &pd)
Constructs a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7614
3D tensor blocked by 2nd dimension with block size 32
Definition: dnnl_types.h:237
Descriptor for an elementwise backward propagation primitive.
Definition: dnnl.hpp:5759
eltwise_backward(const primitive_desc &pd)
Constructs an eltwise backward propagation primitive.
Definition: dnnl.hpp:5856
primitive_desc(const desc &adesc, const engine &aengine, 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:5130
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:3249
(scratch) memory, additional to all inputs and outputs memory (bytes)
Definition: dnnl_types.h:2354
memory::desc diff_src_iter_desc() const
Returns diff source iteration memory descriptor.
Definition: dnnl.hpp:9360
memory::desc scratchpad_desc() const
Returns the scratchpad memory descriptor.
Definition: dnnl.hpp:3207
Elementwise unary operation forward propagation primitive.
Definition: dnnl.hpp:5664
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:8784
Local response normalization (LRN) backward propagation primitive.
Definition: dnnl.hpp:5300
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:8583
memory::desc diff_bias_desc() const
Returns diff bias memory descriptor.
Definition: dnnl.hpp:9005
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc()=default
Default constructor. Produces an empty object.
Eltwise: pow.
Definition: dnnl_types.h:990
memory::desc src_iter_c_desc() const
Returns source recurrent cell state memory descriptor.
Definition: dnnl.hpp:7283
5D tensor blocked by 2nd dimension with block size 4
Definition: dnnl_types.h:342
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:8606
permuted 4D tensor
Definition: dnnl_types.h:210
Reduction using norm_lp_power_p_sum operation.
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:2769
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5741
void get_rnn_weights_qparams(int &mask, std::vector< float > &scales)
Returns the quantization scaling factors for RNN projection weights tensors.
Definition: dnnl.hpp:2948
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:2501
desc()=default
Default constructor. Produces an empty object.
Vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7457
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:4459
memory::desc diff_src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:10276
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a LBR GRU forward propagation primitive.
Definition: dnnl.hpp:9121
resampling_backward(const primitive_desc &pd)
Constructs a resampling backward propagation primitive.
Definition: dnnl.hpp:10034
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:3269
lrn_forward()=default
Default constructor. Produces an empty object.
primitive_desc()=default
Default constructor. Produces an empty object.
#define DNNL_ARG_SRC_ITER
A special mnemonic for RNN input recurrent hidden state vector.
Definition: dnnl_types.h:2120
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:5287
desc(prop_kind aprop_kind, algorithm aalgorithm, 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:5223
inner_product_backward_weights(const primitive_desc &pd)
Constructs an inner product weights gradient primitive.
Definition: dnnl.hpp:7236
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:10017
Forward data propagation (inference mode).
Definition: dnnl_types.h:871
Undefined RNN flags.
Definition: dnnl_types.h:1758
memory::desc query_md(query what, int idx=0) const
Returns a memory descriptor.
Definition: dnnl.hpp:3086
A sum primitive.
Definition: dnnl_types.h:898
dnnl_status_t DNNL_API dnnl_reduction_desc_init(dnnl_reduction_desc_t *desc, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src_desc, const dnnl_memory_desc_t *dst_desc, float p, float eps)
Initializes a descriptor for a reduction primitive.
memory::desc variance_desc() const
Returns memory descriptor for variance.
Definition: dnnl.hpp:6853
oneDNN exception class.
Definition: dnnl.hpp:84
memory::desc weights_projection_desc() const
Returns weights projection memory descriptor.
Definition: dnnl.hpp:8126
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:9542
#define DNNL_ARG_BIAS
Bias tensor argument.
Definition: dnnl_types.h:2182
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:7779
Primitive descriptor for a pooling forward propagation primitive.
Definition: dnnl.hpp:10103
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:4441
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &diff_src_layer_desc, const memory::desc &diff_src_iter_desc, const memory::desc &diff_weights_layer_desc, const memory::desc &diff_weights_iter_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_layer_desc, const memory::desc &diff_dst_iter_desc, rnn_flags flags=rnn_flags::undef)
Constructs a descriptor for LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9232
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:2527
size_t DNNL_API dnnl_memory_desc_get_size(const dnnl_memory_desc_t *memory_desc)
Returns the size of a memory descriptor.
Intel Advanced Vector Extensions 512 (Intel AVX-512) subset for Intel Xeon Phi processors x200 Series...
Definition: dnnl_types.h:2511
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &src_iter_c_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &weights_peephole_desc, const memory::desc &weights_projection_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 and with or without projection) forward...
Definition: dnnl.hpp:7898
primitive_desc()=default
Default constructor. Produces an empty object.
void set_data_handle(void *handle) const
Sets the underlying memory buffer.
Definition: dnnl.hpp:2156
Forward data propagation (inference mode).
A descriptor of a element-wise operation.
Definition: dnnl_types.h:1438
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:1491
Descriptor for a convolution weights gradient primitive.
Definition: dnnl.hpp:4220
An opaque structure for a chain of post operations.
A descriptor of an inner product operation.
Definition: dnnl_types.h:1722
Eltwise: round.
Definition: dnnl_types.h:994
primitive_desc(const memory::desc &dst, const std::vector< float > &scales, const std::vector< memory::desc > &srcs, const engine &aengine, const primitive_attr &attr=primitive_attr())
Constructs a primitive descriptor for a sum primitive.
Definition: dnnl.hpp:3618
Descriptor for a deconvolution weights gradient primitive.
Definition: dnnl.hpp:4931
The operation failed because of incorrect function arguments.
Definition: dnnl_types.h:45
Forward data propagation, alias for dnnl::prop_kind::forward_training.
int len() const
Returns the number of post-ops entries.
Definition: dnnl.hpp:2278
runtime estimation (seconds), unimplemented
resampling_forward(const primitive_desc &pd)
Constructs a resampling forward propagation primitive.
Definition: dnnl.hpp:9920
desc(prop_kind aprop_kind, const memory::desc &data_desc, const memory::desc &weight_desc)
Constructs a descriptor for a PReLU forward propagation primitive.
Definition: dnnl.hpp:10320
Intel AVX2 and Intel Deep Learning Boost (Intel DL Boost) support.
Pooling forward propagation primitive.
Definition: dnnl.hpp:5412
primitive_desc(const memory::desc &dst, int concat_dimension, const std::vector< memory::desc > &srcs, const engine &aengine, const primitive_attr &attr=primitive_attr())
Constructs a primitive descriptor for an out-of-place concatenation primitive.
Definition: dnnl.hpp:3527
dnnl_rnn_direction_t
A direction of RNN primitive execution.
Definition: dnnl_types.h:1762
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:4027
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, const pooling_v2_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a pooling v2 (dilated pooling) backward propagation primitive...
Definition: dnnl.hpp:10257
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:7766
inner product descriptor
Definition: dnnl_types.h:2377
desc(algorithm aalgorithm, const memory::desc &diff_src_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &kernel, const memory::dims &dilation, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for pooling v2 (dilated pooling) backward propagation primitive.
Definition: dnnl.hpp:10199
5D tensor blocked by 2nd dimension with block size 16
Definition: dnnl_types.h:331
A descriptor of reduction operation.
Definition: dnnl_types.h:1936
6D tensor blocked by 2nd dimension with block size 4
Definition: dnnl_types.h:393
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:6978
batch_normalization_forward(const primitive_desc &pd)
Constructs a batch normalization forward propagation primitive.
Definition: dnnl.hpp:6415
void get_params_binary(int index, algorithm &aalgorithm, memory::desc &src1_desc) const
Returns the parameters of a binary post-op.
Definition: dnnl.hpp:2578
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:10727
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.
desc(algorithm aalgorithm, const memory::desc &diff_src_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &kernel, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for pooling backward propagation primitive.
Definition: dnnl.hpp:5550
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:5622
stream()=default
Constructs an empty stream.
Pooling backward propagation primitive.
Definition: dnnl.hpp:5524
Undefined data type (used for empty memory descriptors).
Reduction using lp norm.
Definition: dnnl_types.h:1062
memory::desc dst_iter_c_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8142
dnnl_status_t DNNL_API dnnl_primitive_create(dnnl_primitive_t *primitive, const_dnnl_primitive_desc_t primitive_desc)
Creates a primitive.
dnnl_status_t DNNL_API dnnl_pooling_v2_backward_desc_init(dnnl_pooling_v2_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 dilation, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for pooling v2 (pooling with dilation support) backward propagation primitiv...
Binary mul.
Definition: dnnl_types.h:1036
LRN within a single channel.
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:5511
dnnl_status_t DNNL_API dnnl_post_ops_destroy(dnnl_post_ops_t post_ops)
Destroys post-ops.
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:8580
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:8995
Primitive descriptor for a batch normalization forward propagation primitive.
Definition: dnnl.hpp:6322
Elementwise: rectified linear unit (ReLU)
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:8098
PReLU forward propagation primitive.
Definition: dnnl.hpp:10307
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:6823
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:8964
A softmax primitive.
Definition: dnnl_types.h:906
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5841
memory::desc diff_dst_layer_desc() const
Returns diff destination layer memory descriptor.
Definition: dnnl.hpp:7395
desc(prop_kind aprop_kind, const memory::desc &data_desc, float epsilon, normalization_flags flags)
Constructs a batch normalization descriptor for forward propagation.
Definition: dnnl.hpp:6309
memory::desc weights_peephole_desc() const
Returns weights peephole memory descriptor.
Definition: dnnl.hpp:8570
int64_t dnnl_dim_t
A type to describe tensor dimension.
Definition: dnnl_types.h:1162
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.
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for an LSTM forward propagation primitive.
Definition: dnnl.hpp:8081
Forward data propagation (alias for dnnl_forward_training).
Definition: dnnl_types.h:875
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:9159
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:9167
stream & wait()
Waits for all primitives executing in the stream to finish.
Definition: dnnl.hpp:1019
primitive kind
Definition: dnnl_types.h:2343
matrix multiplication (matmul) descriptor
Definition: dnnl_types.h:2382
shuffle_backward()=default
Default constructor. Produces an empty object.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:9645
Default stream configuration.
Definition: dnnl_types.h:2417
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6513
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:6363
Reduction.
Definition: dnnl.hpp:10505
Shuffle forward propagation primitive.
Definition: dnnl.hpp:9410
error(dnnl_status_t status, const char *message)
Constructs an instance of an exception class.
Definition: dnnl.hpp:92
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a matmul primitive.
Definition: dnnl.hpp:9730
LRN within a single channel.
Definition: dnnl_types.h:1018
primitive_desc(const desc &adesc, const engine &aengine, 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:6467
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:2270
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:6670
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:368
bool next_impl()
Advances the primitive iterator to the next implementation.
Definition: dnnl.hpp:3740
pooling_backward(const primitive_desc &pd)
Constructs a pooling backward propagation primitive.
Definition: dnnl.hpp:5637
dnnl_status_t DNNL_API dnnl_pooling_v2_forward_desc_init(dnnl_pooling_v2_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 dilation, const dnnl_dims_t padding_l, const dnnl_dims_t padding_r)
Initializes a descriptor for pooling v2 (pooling with dilation support) forward propagation primitive...
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:7761
memory::desc diff_dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6047
batch_normalization_forward()=default
Default constructor. Produces an empty object.
plain 6D tensor
Definition: dnnl_types.h:183
Tensor concatenation (concat) primitive.
Definition: dnnl.hpp:3509
Primitive attributes.
Definition: dnnl.hpp:2602
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:9321
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:1006
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:4202
Winograd convolution.
Definition: dnnl_types.h:947
void get_params_eltwise(int index, float &scale, algorithm &aalgorithm, float &alpha, float &beta) const
Returns parameters of an elementwise post-op.
Definition: dnnl.hpp:2379
5D tensor blocked by 3rd dimension with block size 4
Definition: dnnl_types.h:381
int get_primitive_cache_capacity()
Returns the number of primitives that can be held in the primitive cache at the same time...
Definition: dnnl.hpp:10696
desc reshape(const dims &adims, bool allow_empty=false) const
Constructs a memory descriptor by reshaping an existing one.
Definition: dnnl.hpp:1938
Intel AVX-512 subset for Intel Xeon Scalable processor family and Intel Core processor family...
primitive_attr(dnnl_primitive_attr_t attr)
Creates primitive attributes from a C API dnnl_primitive_attr_t handle.
Definition: dnnl.hpp:2618
primitive_desc(const desc &adesc, const engine &aengine, 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:7176
#define DNNL_ARG_DIFF_SRC_ITER_C
A special mnemonic for gradient (diff) of RNN input recurrent cell state vector.
Definition: dnnl_types.h:2214
Vanilla RNN backward propagation primitive.
Definition: dnnl.hpp:7618
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:6663
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:5176
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:5386
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:7321
Layer normalization backward propagation primitive.
Definition: dnnl.hpp:6717
dnnl_format_tag_t
Memory format tag specification.
Definition: dnnl_types.h:164
Max pooling.
Definition: dnnl_types.h:1008
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.
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:7592
Eltwise: natural logarithm.
Definition: dnnl_types.h:986
Reduction using max operation.
memory::desc diff_src_layer_desc() const
Returns diff source layer memory descriptor.
Definition: dnnl.hpp:7800
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for an LRN forward propagation primitive.
Definition: dnnl.hpp:5249
memory::desc diff_bias_desc() const
Returns the diff bias memory descriptor.
Definition: dnnl.hpp:4473
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:8092
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:3301
primitive_desc(const desc &adesc, const engine &aengine, const primitive_attr &attr=primitive_attr(), bool allow_empty=false)
Constructs a primitive descriptor for a shuffle forward propagation primitive.
Definition: dnnl.hpp:9450
const char * what() const noexcept override
Returns the explanatory string.
Definition: dnnl.hpp:96
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a convolution forward propagation primitive.
Definition: dnnl.hpp:4007
dnnl_status_t DNNL_API dnnl_memory_map_data(const_dnnl_memory_t memory, void **mapped_ptr)
Maps a memory object and returns a host-side pointer to a memory buffer with a copy of its contents...
#define DNNL_ARG_DIFF_WEIGHTS_PROJECTION
A special mnemonic for diff of RNN weights applied to the projection weights.
Definition: dnnl_types.h:2265
Unidirectional execution of RNN primitive from left to right.
dnnl_status_t DNNL_API dnnl_post_ops_append_binary(dnnl_post_ops_t post_ops, dnnl_alg_kind_t alg_kind, const dnnl_memory_desc_t *src1_desc)
Appends a binary post-op.
plain 12D tensor
Definition: dnnl_types.h:189
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.
primitive_desc(const_dnnl_op_desc_t desc, const primitive_attr *attr, const engine &aengine, const_dnnl_primitive_desc_t hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor.
Definition: dnnl.hpp:3722
kind
Kinds of engines.
Definition: dnnl.hpp:868
dnnl_status_t DNNL_API dnnl_primitive_attr_get_rnn_weights_projection_qparams(const_dnnl_primitive_attr_t attr, dnnl_dim_t *count, int *mask, const float **scales)
Returns the quantization scaling factors for RNN projection weights tensors.
4D CNN activations tensor blocked by channels with block size 4, an alias to dnnl_aBcd4b ...
Definition: dnnl_types.h:615
Base class for all computational primitives.
Definition: dnnl.hpp:269
Reduction using lp norm.
Definition: dnnl_types.h:1060
T get(bool allow_empty=false) const
Returns the underlying C API handle.
Definition: dnnl.hpp:185
Primitive descriptor for a reduction primitive.
Definition: dnnl.hpp:10540
Binary div.
Definition: dnnl_types.h:1042
Primitive descriptor for a batch normalization backward propagation primitive.
Definition: dnnl.hpp:6450
const version_t * version()
Returns library version information.
Definition: dnnl.hpp:10630
4D tensor blocked by 2nd dimension with block size 8
Definition: dnnl_types.h:303
Out-of-order execution.
Definition: dnnl_types.h:2415
Descriptor for a GRU backward propagation primitive.
Definition: dnnl.hpp:8817
Fuse normalization with ReLU.
Binary min.
Definition: dnnl_types.h:1040
pooling_backward()=default
Default constructor. Produces an empty object.
Batch normalization backward propagation primitive.
Definition: dnnl.hpp:6419
status
Status values returned by the library functions.
Definition: dnnl.hpp:10607
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a PReLU forward propagation primitive.
Definition: dnnl.hpp:10361
desc(const dims &adims, data_type adata_type, const dims &strides, bool allow_empty=false)
Constructs a memory descriptor by strides.
Definition: dnnl.hpp:1852
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:7196
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:6676
memory::desc bias_desc() const
Returns the bias memory descriptor.
Definition: dnnl.hpp:4750
Primitive descriptor for a logsoftmax forward propagation primitive.
Definition: dnnl.hpp:6097
void get_rnn_data_qparams(float &scale, float &shift)
Returns the quantization scale and shift parameters for RNN data tensors.
Definition: dnnl.hpp:2886
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:4205
Default stream configuration.
permuted 3D tensor
Definition: dnnl_types.h:196
primitive_desc()=default
Default constructor. Produces an empty object.
4D tensor blocked by 3rd dimension with block size 4
Definition: dnnl_types.h:323
5D CNN activations tensor blocked by channels with block size 4, an alias to dnnl_aBcde4b ...
Definition: dnnl_types.h:603
layer_normalization_backward()=default
Default constructor. Produces an empty object.
Average pooling (alias for dnnl_pooling_avg_exclude_padding)
Definition: dnnl_types.h:1014
Descriptor for a batch normalization forward propagation primitive.
Definition: dnnl.hpp:6292
Primitive descriptor for an LRN backward propagation primitive.
Definition: dnnl.hpp:5330
Descriptor for an elementwise binary operator primitive.
Definition: dnnl.hpp:9570
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:7295
#define DNNL_ARG_DIFF_BIAS
Gradient (diff) of the bias tensor argument.
Definition: dnnl_types.h:2268
memory::desc diff_src_layer_desc() const
Returns diff source layer memory descriptor.
Definition: dnnl.hpp:8985
Pooling v2 (dilated pooling) forward propagation primitive.
Definition: dnnl.hpp:10050
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6836
3D tensor blocked by 2nd dimension with block size 8
Definition: dnnl_types.h:262
Binary add.
Definition: dnnl_types.h:1034
dnnl_status_t DNNL_API dnnl_lstm_backward_desc_init_v3(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 *weights_projection_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_weights_projection_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 and with or with out recurrent project...
memory::desc dst_iter_c_desc() const
Returns destination recurrent cell state memory descriptor.
Definition: dnnl.hpp:7335
deconvolution descriptor
Definition: dnnl_types.h:2368
A pooling primitive.
Definition: dnnl_types.h:908
void get_params_sum(int index, float &scale, memory::data_type &data_type) const
Returns the parameters of an accumulation (sum) post-op.
Definition: dnnl.hpp:2343
#define DNNL_ARG_WEIGHTS_PEEPHOLE
A special mnemonic for RNN weights applied to the peephole weights.
Definition: dnnl_types.h:2173
Primitive descriptor for a PReLU forward propagation primitive.
Definition: dnnl.hpp:10331
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:8946
rnn descriptor
Definition: dnnl_types.h:2378
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:2752
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:7092
memory required for scratchpad (bytes)
LSTM forward propagation primitive.
Definition: dnnl.hpp:7845
memory::data_type data_type() const
Returns the data type of the memory descriptor.
Definition: dnnl.hpp:2008
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:973
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:10719
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:6839
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:3453
resampling_backward()=default
Default constructor. Produces an empty object.
A descriptor of a shuffle operation.
Definition: dnnl_types.h:1416
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:10022
memory::desc diff_weights_projection_desc() const
Returns diff weights projection memory descriptor.
Definition: dnnl.hpp:7380
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:10151
prelu_forward()=default
Default constructor. Produces an empty object.
desc(algorithm aalgorithm, 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:9954
Intel AVX-512, Intel DL Boost and bfloat16 support for Intel Xeon Scalable processor family and Intel...
cpu_isa get_effective_cpu_isa()
Gets the maximal ISA the library can dispatch to on the CPU.
Definition: dnnl.hpp:10682
primitive_desc(const desc &adesc, const engine &aengine, 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:6003
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:3677
Eltwise: hyperbolic tangent non-linearity (tanh) (dst for backward)
Definition: dnnl_types.h:998
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.
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a GRU forward propagation primitive.
Definition: dnnl.hpp:8754
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:4910
lbr_gru_forward(const primitive_desc &pd)
Constructs an LBR GRU forward propagation primitive.
Definition: dnnl.hpp:9178
Winograd deconvolution.
Definition: dnnl_types.h:953
dnnl_status_t DNNL_API dnnl_set_max_cpu_isa(dnnl_cpu_isa_t isa)
Sets the maximal ISA the library can dispatch to on the CPU.
memory::desc bias_desc() const
Returns the bias memory descriptor.
Definition: dnnl.hpp:9751
permuted 4D tensor
Definition: dnnl_types.h:211
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:6679
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:8969
primitive_desc()=default
Default constructor. Produces an empty object.
Primitive descriptor for an LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9266
layer_normalization_backward(const primitive_desc &pd)
Constructs a layer normalization backward propagation primitive.
Definition: dnnl.hpp:6867
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:7209
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:1106
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:7774
reorder()=default
Default constructor. Produces an empty object.
Convolution backward propagation primitive.
Definition: dnnl.hpp:4049
number of outputs expected
Definition: dnnl_types.h:2346
Primitive descriptor for a deconvolution forward propagation primitive.
Definition: dnnl.hpp:4694
memory::desc diff_src_iter_c_desc() const
Returns diff source recurrent cell state memory descriptor.
Definition: dnnl.hpp:7355
reorder(const primitive_desc &pd)
Constructs a reorder primitive.
Definition: dnnl.hpp:3461
memory::desc bias_desc() const
Returns the bias memory descriptor.
Definition: dnnl.hpp:6993
Descriptor for a matmul primitive.
Definition: dnnl.hpp:9672
#define DNNL_MAX_NDIMS
Maximum number of dimensions a tensor can have.
Definition: dnnl_types.h:1130
engine get_dst_engine() const
Returns the engine on which the destination memory is allocated.
Definition: dnnl.hpp:3445
lbr_gru_backward(const primitive_desc &pd)
Constructs an LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9396
gru_backward()=default
Default constructor. Produces an empty object.
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:7784
Primitive descriptor for a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7527
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a layer normalization forward propagation primitive.
Definition: dnnl.hpp:6636
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:7792
Softmax forward propagation primitive.
Definition: dnnl.hpp:5870
primitive_desc()=default
Default constructor. Produces an empty object.
Bidirectional execution of RNN primitive with concatenation of the results.
Definition: dnnl_types.h:1769
Reduction using min.
Definition: dnnl_types.h:1052
permuted 2D tensor
Definition: dnnl_types.h:202
permuted 5D tensor
Definition: dnnl_types.h:213
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:4765
memory::desc diff_dst_layer_desc() const
Returns diff destination layer memory descriptor.
Definition: dnnl.hpp:9380
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a dilated convolution weights gradient primitive with bias...
Definition: dnnl.hpp:4338
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:7071
permuted 6D tensor
Definition: dnnl_types.h:198
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:7329
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:7795
memory::desc src1_desc() const
Returns the memory descriptor for source #1.
Definition: dnnl.hpp:9642
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:8611
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:2722
dnnl_engine_kind_t convert_to_c(engine::kind akind)
Converts engine kind enum value from C++ API to C API type.
Definition: dnnl.hpp:955
memory::desc src_desc(int idx=0) const
Returns a source memory descriptor.
Definition: dnnl.hpp:3577
dnnl::primitive::kind get_kind() const
Returns the kind of the primitive descriptor.
Definition: dnnl.hpp:3237
5D CNN activations tensor blocked by channels with block size 8, an alias to dnnl_aBcde8b ...
Definition: dnnl_types.h:606
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for an elementwise binary operator primitive.
Definition: dnnl.hpp:9623
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:6036
propagation kind
Definition: dnnl_types.h:2362
Descriptor for a GRU forward propagation primitive.
Definition: dnnl.hpp:8668
inner_product_forward()=default
Default constructor. Produces an empty object.
plain 9D tensor
Definition: dnnl_types.h:186
cpu_isa
CPU instruction set flags.
Definition: dnnl.hpp:10650
An inner product primitive.
Definition: dnnl_types.h:916
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7541
Use global statistics.
Definition: dnnl_types.h:1092
Primitive descriptor for an elementwise binary operator primitive.
Definition: dnnl.hpp:9595
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a pooling forward propagation primitive.
Definition: dnnl.hpp:5473
desc(prop_kind aprop_kind, algorithm activation, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &diff_src_layer_desc, const memory::desc &diff_src_iter_desc, const memory::desc &diff_weights_layer_desc, const memory::desc &diff_weights_iter_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_layer_desc, const memory::desc &diff_dst_iter_desc, rnn_flags flags=rnn_flags::undef, float alpha=0.0f, float beta=0.0f)
Constructs a descriptor for a vanilla RNN backward propagation primitive.
Definition: dnnl.hpp:7675
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a deconvolution forward propagation primitive.
Definition: dnnl.hpp:4724
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:8898
memory::desc diff_dst_iter_desc() const
Returns diff destination iteration memory descriptor.
Definition: dnnl.hpp:9385
engine get_engine() const
Returns the associated engine.
Definition: dnnl.hpp:2094
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for an LRN forward propagation primitive.
Definition: dnnl.hpp:5264
GRU cell.
Definition: dnnl_types.h:1024
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6990
memory::desc variance_desc() const
Returns memory descriptor for variance.
Definition: dnnl.hpp:6685
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a softmax forward propagation primitive.
Definition: dnnl.hpp:5911
The operation was successful.
Definition: dnnl_types.h:41
memory::desc weights_layer_desc() const
Returns weights layer memory descriptor.
Definition: dnnl.hpp:8779
Undefined propagation kind.
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:4905
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:1118
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:7403
kind get_kind() const
Returns the kind of the primitive.
Definition: dnnl.hpp:375
Elementwise: hyperbolic tangent non-linearity (tanh)
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:10004
A descriptor of a Layer Normalization operation.
Definition: dnnl_types.h:1685
8-bit signed integer.
Definition: dnnl_types.h:74
Primitive descriptor for an elementwise forward propagation primitive.
Definition: dnnl.hpp:5694
convolution descriptor
Definition: dnnl_types.h:2367
concat()=default
Default constructor. Produces an empty object.
RNN cell.
Definition: dnnl_types.h:1020
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:6810
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:3174
Alias for dnnl_unidirectional_left2right.
Definition: dnnl_types.h:1774
A (out-of-place) concat primitive.
Definition: dnnl_types.h:896
handle(T t, bool weak=false)
Constructs a handle wrapper object from a C API handle.
Definition: dnnl.hpp:169
convolution_backward_data()=default
Default constructor. Produces an empty object.
dnnl_status_t DNNL_API dnnl_prelu_forward_desc_init(dnnl_prelu_desc_t *prelu_desc, dnnl_prop_kind_t prop_kind, const dnnl_memory_desc_t *data_desc, const dnnl_memory_desc_t *weights_desc)
Initializes a descriptor for PReLU (leaky ReLU with trainable alpha parameter) forward propagation pr...
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.
dnnl_status_t DNNL_API dnnl_set_jit_profiling_jitdumpdir(const char *dir)
Sets JIT dump output path.
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &bias_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a dilated deconvolution forward propagation primitive with bias...
Definition: dnnl.hpp:4625
dnnl_status_t DNNL_API dnnl_primitive_destroy(dnnl_primitive_t primitive)
Destroys a primitive.
Intel AVX-512 and Intel Deep Learning Boost (Intel DL Boost) support for Intel Xeon Scalable processo...
Definition: dnnl_types.h:2524
Undefined memory format tag.
Definition: dnnl_types.h:166
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc(const memory &src, const memory &dst, const primitive_attr &attr=primitive_attr(), bool allow_empty=false)
Constructs a primitive descriptor for reorder primitive.
Definition: dnnl.hpp:3414
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:9902
#define DNNL_ARG_DIFF_SRC_LAYER
A special mnemonic for gradient (diff) of RNN input vector.
Definition: dnnl_types.h:2202
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.
Reduction using mul.
Definition: dnnl_types.h:1056
permuted 5D tensor
Definition: dnnl_types.h:197
Eltwise: square root.
Definition: dnnl_types.h:965
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.
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a resampling forward propagation primitive. ...
Definition: dnnl.hpp:9891
primitive_desc()=default
Default constructor. Produces an empty object.
lstm_backward(const primitive_desc &pd)
Constructs an LSTM backward propagation primitive.
Definition: dnnl.hpp:8662
primitive_desc()=default
Default constructor. Produces an empty object.
Primitive descriptor for resampling backward propagation primitive.
Definition: dnnl.hpp:9967
void set_output_scales(int mask, const std::vector< float > &scales)
Sets output scaling factors correspondence mask and values.
Definition: dnnl.hpp:2704
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:3115
Primitive descriptor for an LSTM forward propagation primitive.
Definition: dnnl.hpp:8053
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:103
Intel Advanced Vector Extensions (Intel AVX)
lrn_forward(const primitive_desc &pd)
Constructs an LRN forward propagation primitive.
Definition: dnnl.hpp:5296
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:9680
convolution_forward(const primitive_desc &pd)
Constructs a convolution forward propagation primitive.
Definition: dnnl.hpp:4045
permuted 3D tensor
Definition: dnnl_types.h:206
dnnl_status_t DNNL_API dnnl_set_jit_dump(int enable)
Configures dumping of JIT-generated code.
permuted 8D tensor
Definition: dnnl_types.h:218
primitive_desc(const desc &adesc, const engine &aengine, 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:4161
Primitive or engine failed on execution.
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a resampling forward propagation primitive. ...
Definition: dnnl.hpp:9875
GRU backward propagation primitive.
Definition: dnnl.hpp:8815
desc(algorithm aalgorithm, const memory::desc &diff_src_desc, const memory::desc &weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for dilated convolution backward propagation primitive.
Definition: dnnl.hpp:4123
dnnl_status_t DNNL_API dnnl_memory_set_data_handle_v2(dnnl_memory_t memory, void *handle, dnnl_stream_t stream)
Sets the underlying memory buffer.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:10381
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a deconvolution weights gradient primitive without bias.
Definition: dnnl.hpp:5002
Inner product backward propagation primitive.
Definition: dnnl.hpp:7006
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.
LBR GRU forward propagation primitive.
Definition: dnnl.hpp:9030
rnn_primitive_desc_base()=default
Default constructor. Produces an empty object.
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:6858
source memory desc
Definition: dnnl_types.h:2389
A base class for descriptors of all primitives that have an operation descriptor and that support ite...
Definition: dnnl.hpp:3695
#define DNNL_ARG_DIFF_DST_LAYER
A special mnemonic for gradient (diff) of RNN output vector.
Definition: dnnl_types.h:2223
Eltwise: swish.
Definition: dnnl_types.h:984
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:4916
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:9545
memory(const desc &md, const engine &aengine, void *handle)
Constructs a memory object.
Definition: dnnl.hpp:2068
engine get_src_engine() const
Returns the engine on which the source memory is allocated.
Definition: dnnl.hpp:3439
desc()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a batch normalization forward propagation primitive.
Definition: dnnl.hpp:6352
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:3168
desc(const memory::desc &diff_data_desc, int axis, int group_size)
Constructs a descriptor for a shuffle backward propagation primitive.
Definition: dnnl.hpp:9497
#define DNNL_ARG_TO
A special mnemonic for reorder destination argument.
Definition: dnnl_types.h:2135
pooling_forward(const primitive_desc &pd)
Constructs a pooling forward propagation primitive.
Definition: dnnl.hpp:5520
status set_jit_profiling_flags(unsigned flags)
Sets library profiling flags.
Definition: dnnl.hpp:10640
dnnl_cpu_isa_t DNNL_API dnnl_get_effective_cpu_isa(void)
Gets the maximal ISA the library can dispatch to on the CPU.
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:9316
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:5505
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:8636
Memory descriptor.
Definition: dnnl_types.h:1274
const dnnl_version_t DNNL_API * dnnl_version(void)
Returns library version information.
Elementwise binary operator primitive.
Definition: dnnl.hpp:9568
A descriptor of a pooling operation.
Definition: dnnl_types.h:1559
dnnl_data_type_t data_type
Data type of the tensor elements.
Definition: dnnl_types.h:1294
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:8542
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc mean_desc() const
Returns memory descriptor for mean.
Definition: dnnl.hpp:6850
A matrix multiplication primitive.
Definition: dnnl_types.h:926
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:2333
dnnl_status_t DNNL_API dnnl_prelu_backward_desc_init(dnnl_prelu_desc_t *prelu_desc, const dnnl_memory_desc_t *data_desc, const dnnl_memory_desc_t *weights_desc, const dnnl_memory_desc_t *diff_data_desc, const dnnl_memory_desc_t *diff_weights_desc)
Initializes a descriptor for PReLU (leaky ReLU with trainable alpha parameter) backward propagation p...
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:5947
primitive_desc(int concat_dimension, const std::vector< memory::desc > &srcs, const engine &aengine, const primitive_attr &attr=primitive_attr())
Constructs a primitive descriptor for an out-of-place concatenation primitive.
Definition: dnnl.hpp:3554
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:5962
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a pooling v2 (dilated pooling) forward propagation primitive...
Definition: dnnl.hpp:10117
primitive_attr get_primitive_attr() const
Returns the primitive attributes.
Definition: dnnl.hpp:3225
Eltwise: erf-based gelu.
Definition: dnnl_types.h:992
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:3580
permuted 9D tensor
Definition: dnnl_types.h:219
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:4763
handle< T, traits > & operator=(const handle< T, traits > &)=default
Assignment operator.
Primitive descriptor for a reorder primitive.
Definition: dnnl.hpp:3365
Backward weights propagation.
Definition: dnnl_types.h:881
layer normalization descriptor
5D tensor blocked by 2nd dimension with block size 32
Definition: dnnl_types.h:340
Reduction using sum operation.
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:3977
memory::desc diff_dst_iter_c_desc() const
Returns diff destination recurrent cell state memory descriptor.
Definition: dnnl.hpp:8651
dnnl_status_t DNNL_API dnnl_primitive_attr_set_rnn_weights_projection_qparams(dnnl_primitive_attr_t attr, dnnl_dim_t count, int mask, const float *scales)
Sets quantization scaling factors for RNN projection weights tensors.
#define DNNL_ARG_DIFF_DST_ITER_C
A special mnemonic for gradient (diff) of RNN input recurrent cell state vector.
Definition: dnnl_types.h:2235
memory::desc diff_weights_layer_desc() const
Returns diff weights layer memory descriptor.
Definition: dnnl.hpp:7810
workspace memory desc
Definition: dnnl_types.h:2395
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.
Memory object.
Definition: dnnl.hpp:1102
convolution_backward_weights(const primitive_desc &pd)
Constructs a convolution weights gradient primitive.
Definition: dnnl.hpp:4484
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:7574
Descriptor for a pooling backward propagation primitive.
Definition: dnnl.hpp:5526
primitive_desc()=default
Default constructor. Produces an empty object.
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:6376
memory::desc diff_weights_iter_desc() const
Returns diff weights iteration memory descriptor.
Definition: dnnl.hpp:9370
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:8111
Elementwise: exponent (dst for backward)
eltwise descriptor
Definition: dnnl_types.h:2370
number of inputs expected
Definition: dnnl_types.h:2345
shuffle descriptor
Definition: dnnl_types.h:2369
Average pooling include padding.
Definition: dnnl_types.h:1010
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:8131
Linear (Bilinear, Trilinear) resampling method.
Reduction using min operation.
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:6530
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:5389
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:7269
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:9694
32-bit/single-precision floating point.
Definition: dnnl_types.h:70
desc(prop_kind aprop_kind, algorithm aalgorithm, 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:9847
memory::desc dst_layer_desc() const
Returns destination layer memory descriptor.
Definition: dnnl.hpp:8792
permuted 5D tensor
Definition: dnnl_types.h:212
#define DNNL_MEMORY_ALLOCATE
Special pointer value that indicates that the library needs to allocate an underlying buffer for a me...
Definition: dnnl_types.h:1339
engine scratchpad_engine() const
Returns the engine on which the scratchpad memory is located.
Definition: dnnl.hpp:3213
Intel AVX-512, Intel DL Boost and bfloat16 support for Intel Xeon Scalable processor family and Intel...
Definition: dnnl_types.h:2529
Primitive descriptor for a softmax backward propagation primitive.
Definition: dnnl.hpp:5986
Reorder primitive.
Definition: dnnl.hpp:3363
4D CNN activations tensor blocked by channels with block size 8, an alias to dnnl_aBcd8b ...
Definition: dnnl_types.h:618
bool operator==(const desc &other) const
An equality operator.
Definition: dnnl.hpp:2027
prelu_backward(const primitive_desc &pd)
Constructs a prelu backward propagation primitive.
Definition: dnnl.hpp:10490
Descriptor for an inner product forward propagation primitive.
Definition: dnnl.hpp:6883
memory::desc src_iter_c_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8106
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:7217
Descriptor for a shuffle forward propagation primitive.
Definition: dnnl.hpp:9412
lrn descriptor
Definition: dnnl_types.h:2374
void append_binary(algorithm aalgorithm, const memory::desc &src1_desc)
Appends a binary post-op.
Definition: dnnl.hpp:2567
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 dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:10154
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:6830
dnnl_status_t DNNL_API dnnl_set_primitive_cache_capacity(int capacity)
Sets a number of primitives that can be held in the primitive cache at a time.
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.
primitive_desc(const desc &adesc, const engine &aengine, 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:9984
desc(prop_kind aprop_kind, const memory::desc &data_desc, int logsoftmax_axis)
Constructs a descriptor for a logsoftmax forward propagation primitive.
Definition: dnnl.hpp:6086
memory::desc diff_src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5383
Primitive descriptor for an LSTM backward propagation primitive.
Definition: dnnl.hpp:8494
4D tensor blocked by 1st and 2nd dimension with block size 8
Definition: dnnl_types.h:311
A shuffle primitive.
Definition: dnnl_types.h:894
memory::desc mean_desc() const
Returns memory descriptor for mean.
Definition: dnnl.hpp:6383
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:908
memory::desc diff_dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6255
for creating scratchpad memory
Definition: dnnl_types.h:2357
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.
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:9000
desc(algorithm aalgorithm, 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:9937
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:6535
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:5844
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:9632
Intel AVX-512, Intel DL Boost and bfloat16 support and Intel AMX with 8-bit integer and bfloat16 supp...
bool operator!=(const handle &other) const
Inequality operator.
Definition: dnnl.hpp:220
memory::desc diff_weights_desc() const
Returns a diff weights memory descriptor.
Definition: dnnl.hpp:3192
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:9132
permuted 4D tensor
Definition: dnnl_types.h:207
bool operator==(const handle< T, traits > &other) const
Equality operator.
Definition: dnnl.hpp:210
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:7146
Intel Advanced Vector Extensions 2 (Intel AVX2)
4D tensor blocked by 2nd dimension with block size 4
Definition: dnnl_types.h:282
Binary max.
Definition: dnnl_types.h:1038
Unspecified format kind.
Definition: dnnl_types.h:85
oneAPI namespace
Definition: dnnl.hpp:10777
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:2804
Resampling forward propagation.
Definition: dnnl.hpp:9780
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.
desc(const dims &adims, data_type adata_type, format_tag aformat_tag, bool allow_empty=false)
Constructs a memory descriptor.
Definition: dnnl.hpp:1824
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:6023
Average pooling exclude padding.
Definition: dnnl_types.h:1012
Reduction using mul operation.
memory::desc diff_src_desc(int idx) const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:3133
memory::desc diff_dst_desc() const
Returns a diff destination memory descriptor.
Definition: dnnl.hpp:4467
3D CNN activations tensor blocked by channels with block size 16, an alias to dnnl_aBc16b ...
Definition: dnnl_types.h:624
dnnl_status_t DNNL_API dnnl_get_primitive_cache_capacity(int *capacity)
Returns the number of primitives that can be held in the primitive cache at the same time...
dnnl_alg_kind_t
Kinds of algorithms.
Definition: dnnl_types.h:942
Reduction using norm_lp_power_p_max operation.
primitive_desc()=default
Default constructor. Produces an empty object.
Reduction using max.
Definition: dnnl_types.h:1050
Primitive descriptor for an RNN backward propagation primitive.
Definition: dnnl.hpp:7711
permuted 3D tensor
Definition: dnnl_types.h:209
memory::desc weights_projection_desc() const
Returns weights projection memory descriptor.
Definition: dnnl.hpp:7307
desc get_desc() const
Returns the associated memory descriptor.
Definition: dnnl.hpp:2086
dnnl_rnn_flags_t
Flags for RNN cell.
Definition: dnnl_types.h:1756
Descriptor for a PReLU forward propagation primitive.
Definition: dnnl.hpp:10309
bool operator!=(const desc &other) const
An inequality operator.
Definition: dnnl.hpp:2035
Base class for all primitive descriptors.
Definition: dnnl.hpp:3041
Primitive descriptor for a layer normalization backward propagation primitive.
Definition: dnnl.hpp:6773
A pooling version 2 primitive (pooling with dilation support).
Definition: dnnl_types.h:930
Descriptor for a vanilla RNN forward propagation primitive.
Definition: dnnl.hpp:7459
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:4747
primitive_desc(const desc &adesc, const engine &aengine, 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:8914
memory::desc src0_desc() const
Returns the memory descriptor for source #0.
Definition: dnnl.hpp:9639
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:9572
void append_sum(float scale=1.f, memory::data_type data_type=memory::data_type::undef)
Appends an accumulation (sum) post-op.
Definition: dnnl.hpp:2318
An LRN primitive.
Definition: dnnl_types.h:910
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:3470
A descriptor of a Local Response Normalization (LRN) operation.
Definition: dnnl_types.h:1621
Primitive descriptor for a shuffle backward propagation primitive.
Definition: dnnl.hpp:9506
Primitive descriptor for prelu backward propagation.
Definition: dnnl.hpp:10420
int ndims
Number of dimensions.
Definition: dnnl_types.h:1276
dnnl_stream_flags_t
Stream flags.
Definition: dnnl_types.h:2411
Undefined propagation type.
Definition: dnnl_types.h:864
dnnl_status_t DNNL_API dnnl_engine_get_kind(dnnl_engine_t engine, dnnl_engine_kind_t *kind)
Returns the kind of an engine.
oneDNN C API handle wrapper class.
Definition: dnnl.hpp:136
Primitive or engine failed on execution.
Definition: dnnl_types.h:51
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &adesc, const engine &aengine, 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:8510
void set_rnn_weights_qparams(int mask, const std::vector< float > &scales)
Sets quantization scaling factors for RNN weights tensors.
Definition: dnnl.hpp:2922
op descriptor
Definition: dnnl_types.h:2366
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(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a convolution weights gradient primitive with bias.
Definition: dnnl.hpp:4250
6D tensor blocked by 2nd dimension with block size 8
Definition: dnnl_types.h:388
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:7568
Primitive descriptor for an inner product forward propagation primitive.
Definition: dnnl.hpp:6937
memory::desc src_desc(int idx=0) const
Returns a source memory descriptor.
Definition: dnnl.hpp:9636
primitive_desc(const desc &adesc, const engine &aengine, 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:9283
desc(prop_kind aprop_kind, const memory::desc &data_desc, int axis, int group_size)
Constructs a descriptor for a shuffle forward propagation primitive.
Definition: dnnl.hpp:9424
memory::desc bias_desc() const
Returns bias memory descriptor.
Definition: dnnl.hpp:7315
Descriptor for a deconvolution forward propagation primitive.
Definition: dnnl.hpp:4500
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a logsoftmax forward propagation primitive. ...
Definition: dnnl.hpp:6111
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:6227
Eltwise: exponent.
Definition: dnnl_types.h:975
weights memory descriptor desc
lbr_gru_backward()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:5823
dnnl_status_t DNNL_API dnnl_primitive_attr_get_rnn_weights_qparams(const_dnnl_primitive_attr_t attr, dnnl_dim_t *count, int *mask, const float **scales)
Returns the quantization scaling factors for RNN weights tensors.
desc(const memory::desc &data_desc, const memory::desc &weight_desc, const memory::desc &diff_data_desc, const memory::desc &diff_weights_desc)
Constructs a descriptor for a PReLU backward propagation primitive.
Definition: dnnl.hpp:10407
Reduction using norm_lp_max operation.
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 workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:10157
memory::desc src_iter_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:9143
Local response normalization (LRN) across multiple channels.
Definition: dnnl_types.h:1016
resampling descriptor
Definition: dnnl_types.h:2383
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a convolution forward propagation primitive.
Definition: dnnl.hpp:3991
stream(const engine &aengine, flags aflags=flags::default_flags)
Constructs a stream for the specified engine and with behavior controlled by the specified flags...
Definition: dnnl.hpp:1001
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 &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a LBR GRU forward propagation primitive.
Definition: dnnl.hpp:9105
Forward data propagation, alias for dnnl::prop_kind::forward_inference.
softmax_forward()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &adesc, const engine &aengine, const prelu_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a PReLU backward propagation primitive.
Definition: dnnl.hpp:10437
desc(prop_kind aprop_kind, algorithm aalgorithm, 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:9820
Descriptor for a logsoftmax backward propagation primitive.
Definition: dnnl.hpp:6166
memory::desc diff_dst_layer_desc() const
Returns diff destination layer memory descriptor.
Definition: dnnl.hpp:7825
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:8951
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:5617
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:5150
Primitive descriptor for a GRU forward propagation primitive.
Definition: dnnl.hpp:8726
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for an LSTM forward propagation primitive.
Definition: dnnl.hpp:8066
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:8116
plain 3D tensor
Definition: dnnl_types.h:179
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:3180
Use scale and shift parameters.
Definition: dnnl_types.h:1105
A descriptor of a Batch Normalization operation.
Definition: dnnl_types.h:1652
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:7787
primitive_desc()=default
Default constructor. Produces an empty object.
Intel Advanced Vector Extensions 2 (Intel AVX2)
Definition: dnnl_types.h:2507
3D CNN activations tensor blocked by channels with block size 4, an alias to dnnl_aBc4b ...
Definition: dnnl_types.h:627
Eltwise: exponential linear unit (elu) (dst for backward)
Definition: dnnl_types.h:1000
Logsoftmax forward propagation primitive.
Definition: dnnl.hpp:6070
Convolution algorithm that is chosen to be either direct or Winograd automatically.
Eltwise: exponential linear unit (elu)
Definition: dnnl_types.h:959
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:383
Forward data propagation (alias for dnnl_forward_inference).
Definition: dnnl_types.h:873
Binary sub.
Definition: dnnl_types.h:1044
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:5944
Primitive descriptor for a matmul primitive.
Definition: dnnl.hpp:9704
5D CNN activations tensor blocked by channels with block size 16, an alias to dnnl_aBcde16b ...
Definition: dnnl_types.h:600
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a dilated convolution weights gradient primitive without bias...
Definition: dnnl.hpp:4385
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, rnn_flags flags=rnn_flags::undef)
Constructs a descriptor for LBR GRU forward propagation primitive.
Definition: dnnl.hpp:9068
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a deconvolution weights gradient primitive with bias. ...
Definition: dnnl.hpp:4960
An opaque structure to describe a primitive descriptor.
Descriptor for a LBR GRU backward propagation primitive.
Definition: dnnl.hpp:9184
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:5604
memory::desc diff_src_desc() const
Returns a diff source memory descriptor.
Definition: dnnl.hpp:6516
Eltwise: abs.
Definition: dnnl_types.h:963
bool is_zero() const
Checks whether the memory descriptor is zero (empty).
Definition: dnnl.hpp:2021
Descriptor for resampling forward propagation.
Definition: dnnl.hpp:9782
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:3198
memory::desc workspace_desc() const
Returns the workspace memory descriptor.
Definition: dnnl.hpp:6379
Forward data propagation (training mode).
Definition: dnnl_types.h:867
A deconvolution primitive.
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a GRU forward propagation primitive.
Definition: dnnl.hpp:8739
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a prelu backward propagation primitive from a C API primitive d...
Definition: dnnl.hpp:10470
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, 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:9303
permuted 5D tensor
Definition: dnnl_types.h:194
desc(prop_kind aprop_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:6436
Elementwise: rectified linar unit (ReLU) (dst for backward)
lstm_forward(const primitive_desc &pd)
Constructs an LSTM forward propagation primitive.
Definition: dnnl.hpp:8158
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:5378
Eltwise: tanh-based gelu (alias for dnnl_eltwise_gelu_tanh)
Definition: dnnl_types.h:982
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:6138
Descriptor for an LSTM backward propagation primitive.
Definition: dnnl.hpp:8164
source gradient (diff) memory desc
A rnn primitive.
Definition: dnnl_types.h:918
An opaque structure to describe an execution stream.
Primitive descriptor for an inner product backward propagation primitive.
Definition: dnnl.hpp:7034
Descriptor for a layer normalization backward propagation primitive.
Definition: dnnl.hpp:6719
A logsoftmax primitive.
Definition: dnnl_types.h:924
memory::desc diff_src_iter_desc() const
Returns diff source iteration memory descriptor.
Definition: dnnl.hpp:8990
primitive_desc()=default
Default constructor. Produces an empty object.
rnn_flags
RNN cell flags.
Definition: dnnl.hpp:652
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for an elementwise binary operator primitive.
Definition: dnnl.hpp:9608
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:6370
Descriptor for a shuffle primitive backward propagation primitive.
Definition: dnnl.hpp:9487
permuted 5D tensor
Definition: dnnl_types.h:205
dnnl_status_t DNNL_API dnnl_post_ops_append_sum_v2(dnnl_post_ops_t post_ops, float scale, dnnl_data_type_t data_type)
Appends an accumulation v2 (sum) to post-ops.
memory::desc diff_src_iter_desc() const
Returns diff source iteration memory descriptor.
Definition: dnnl.hpp:7805
logsoftmax_forward(const primitive_desc &pd)
Constructs a logsoftmax forward propagation primitive.
Definition: dnnl.hpp:6160
desc(prop_kind aprop_kind, rnn_direction direction, const memory::desc &src_layer_desc, const memory::desc &src_iter_desc, const memory::desc &src_iter_c_desc, const memory::desc &weights_layer_desc, const memory::desc &weights_iter_desc, const memory::desc &bias_desc, const memory::desc &dst_layer_desc, const memory::desc &dst_iter_desc, const memory::desc &dst_iter_c_desc, const memory::desc &diff_src_layer_desc, const memory::desc &diff_src_iter_desc, const memory::desc &diff_src_iter_c_desc, const memory::desc &diff_weights_layer_desc, const memory::desc &diff_weights_iter_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_layer_desc, const memory::desc &diff_dst_iter_desc, const memory::desc &diff_dst_iter_c_desc, rnn_flags flags=rnn_flags::undef)
Constructs an LSTM descriptor for backward propagation using prop_kind, direction, and memory descriptors.
Definition: dnnl.hpp:8453
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &bias_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a deconvolution forward propagation primitive with bias.
Definition: dnnl.hpp:4532
The operation failed because requested functionality is not implemented.
Definition: dnnl_types.h:47
Eltwise: gelu.
Definition: dnnl_types.h:980
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:5735
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:4741
memory::desc diff_dst_layer_desc() const
Returns diff destination layer memory descriptor.
Definition: dnnl.hpp:9010
Eltwise: hyperbolic tangent non-linearity (tanh)
Definition: dnnl_types.h:957
primitive_desc()=default
Default constructor. Produces an empty object.
Primitive descriptor for a deconvolution backward propagation primitive.
Definition: dnnl.hpp:4855
desc(prop_kind aprop_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:6924
desc(algorithm aalgorithm, 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:5773
Softmax backward propagation primitive.
Definition: dnnl.hpp:5960
void set_primitive_cache_capacity(int capacity)
Sets a number of primitives that can be held in the primitive cache at a time.
Definition: dnnl.hpp:10704
permuted 10D tensor
Definition: dnnl_types.h:220
primitive_desc(const desc &adesc, const engine &aengine, const pooling_v2_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a pooling v2 (dilated pooling) backward propagation primitive...
Definition: dnnl.hpp:10237
Bidirectional execution of RNN primitive with summation of the results.
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:4913
Primitive descriptor for an LBR GRU forward propagation primitive.
Definition: dnnl.hpp:9091
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:1908
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:8588
primitive_desc()=default
Default constructor. Produces an empty object.
primitive_desc(const desc &adesc, const engine &aengine, 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:4872
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:4454
desc(prop_kind aprop_kind, const memory::desc &data_desc, int softmax_axis)
Constructs a descriptor for a softmax forward propagation primitive.
Definition: dnnl.hpp:5886
scratchpad_mode get_scratchpad_mode() const
Returns the scratchpad mode.
Definition: dnnl.hpp:2622
primitive_desc(const std::vector< float > &scales, const std::vector< memory::desc > &srcs, const engine &aengine, const primitive_attr &attr=primitive_attr())
Constructs a primitive descriptor for a sum primitive.
Definition: dnnl.hpp:3648
dnnl_status_t DNNL_API dnnl_post_ops_get_params_sum_v2(const_dnnl_post_ops_t post_ops, int index, float *scale, dnnl_data_type_t *data_type)
Returns the parameters of an accumulation (sum) post-op with a data type parameter.
query
Primitive descriptor query specification.
Definition: dnnl.hpp:739
memory::desc diff_dst_layer_desc() const
Returns diff destination layer memory descriptor.
Definition: dnnl.hpp:8641
Primitive descriptor for a sum primitive.
Definition: dnnl.hpp:3604
T * map_data() const
Maps a memory object and returns a host-side pointer to a memory buffer with a copy of its contents...
Definition: dnnl.hpp:2184
dnnl_prop_kind_t
Kinds of propagation.
Definition: dnnl_types.h:861
#define DNNL_ARG_DIFF_WEIGHTS_LAYER
A special mnemonic for diff of RNN weights applied to the layer input.
Definition: dnnl_types.h:2247
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. ...
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a dilated deconvolution weights gradient primitive without bias...
Definition: dnnl.hpp:5092
permuted 6D tensor
Definition: dnnl_types.h:216
scratchpad_mode
Scratchpad mode.
Definition: dnnl.hpp:401
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a dilated deconvolution forward propagation primitive without bias...
Definition: dnnl.hpp:4673
Descriptor for a pooling forward propagation primitive.
Definition: dnnl.hpp:5414
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for an elementwise forward propagation primitive.
Definition: dnnl.hpp:5724
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:6510
desc(prop_kind aprop_kind, algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &weights_desc, const memory::desc &dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a deconvolution forward propagation primitive without bias...
Definition: dnnl.hpp:4577
primitive_desc(const desc &adesc, const engine &aengine, 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:5803
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a convolution weights gradient primitive without bias.
Definition: dnnl.hpp:4293
primitive_desc()=default
Default constructor. Produces an empty object.
desc(prop_kind aprop_kind, const memory::desc &diff_data_desc, const memory::desc &data_desc, const memory::desc &stat_desc, float epsilon, normalization_flags flags)
Constructs a descriptor for layer normalization backward propagation primitive.
Definition: dnnl.hpp:6735
Convolution weights gradient primitive.
Definition: dnnl.hpp:4218
Elementwise: gelu alias for dnnl::algorithm::eltwise_gelu_tanh.
void set_rnn_weights_projection_qparams(int mask, const std::vector< float > &scales)
Sets quantization scaling factors for RNN projection weights tensors.
Definition: dnnl.hpp:2989
Nearest Neighbor Resampling Method.
Definition: dnnl_types.h:1046
std::vector< dim > dims
Vector of dimensions.
Definition: dnnl.hpp:1109
concat(const primitive_desc &pd)
Constructs a concatenation primitive.
Definition: dnnl.hpp:3588
permuted 4D tensor
Definition: dnnl_types.h:204
memory::dim query_s64(query what) const
Returns a memory::dim value (same as int64_t).
Definition: dnnl.hpp:3065
desc()
Constructs a zero (empty) memory descriptor.
Definition: dnnl.hpp:1807
dnnl_status_t DNNL_API dnnl_stream_destroy(dnnl_stream_t stream)
Destroys 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:5836
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 &adesc, const primitive_attr &attr, const engine &aengine, 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:4181
primitive_desc(dnnl_primitive_desc_t pd)
Constructs a primitive descriptor for a pooling v2 (dilated pooling) forward propagation primitive fr...
Definition: dnnl.hpp:10145
Primitive descriptor for a softmax forward propagation primitive.
Definition: dnnl.hpp:5897
Primitive descriptor for eltwise backward propagation.
Definition: dnnl.hpp:5786
source engine
Definition: dnnl_types.h:2359
Descriptor for a softmax forward propagation primitive.
Definition: dnnl.hpp:5872
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:2815
primitive_desc(const desc &adesc, const engine &aengine, 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:5346
memory::desc dst_iter_c_desc() const
Returns source iteration memory descriptor.
Definition: dnnl.hpp:8591
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 normalization primitives.
Definition: dnnl_types.h:1070
weights grad. memory desc
Definition: dnnl_types.h:2392
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:2149
algorithm
Kinds of algorithms.
Definition: dnnl.hpp:470
Resampling backward propagation primitive.
Definition: dnnl.hpp:9924
status set_jit_dump(int enable)
Configures dumping of JIT-generated code.
Definition: dnnl.hpp:10635
memory::desc variance_desc() const
Returns memory descriptor for variance.
Definition: dnnl.hpp:6387
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:8596
Primitive descriptor for a resampling forward propagation primitive.
Definition: dnnl.hpp:9861
format_tag
Memory format tag specification.
Definition: dnnl.hpp:1199
primitive_desc(const desc &adesc, const primitive_attr &attr, const engine &aengine, const prelu_forward::primitive_desc &hint_fwd_pd, bool allow_empty=false)
Constructs a primitive descriptor for a PReLU backward propagation primitive.
Definition: dnnl.hpp:10457
A convolution primitive.
Definition: dnnl_types.h:900
memory desc of an execute argument
Definition: dnnl_types.h:2397
#define DNNL_ARG_FROM
A special mnemonic for reorder source argument.
Definition: dnnl_types.h:2114
Backward bias propagation.
Definition: dnnl_types.h:883
Primitive descriptor for a pooling v2 (dilated pooling) backward propagation primitive.
Definition: dnnl.hpp:10220
memory::desc dst_iter_desc() const
Returns destination iteration memory descriptor.
Definition: dnnl.hpp:7600
memory::desc src_layer_desc() const
Returns source layer memory descriptor.
Definition: dnnl.hpp:9138
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:5163
Eltwise: logistic (dst for backward)
Definition: dnnl_types.h:1004
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:7084
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:5499
weights memory descriptor desc
Definition: dnnl_types.h:2391
memory::desc weights_iter_desc() const
Returns weights iteration memory descriptor.
Definition: dnnl.hpp:7587
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6041
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...
primitive_desc()=default
Default constructor. Produces an empty object.
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:2416
desc(algorithm aalgorithm, const memory::desc &src_desc, const memory::desc &diff_weights_desc, const memory::desc &diff_bias_desc, const memory::desc &diff_dst_desc, const memory::dims &strides, const memory::dims &dilates, const memory::dims &padding_l, const memory::dims &padding_r)
Constructs a descriptor for a dilated deconvolution weights gradient primitive with bias...
Definition: dnnl.hpp:5046
Linear Resampling Method.
Definition: dnnl_types.h:1048
primitive_desc(const desc &adesc, const engine &aengine, bool allow_empty=false)
Constructs a primitive descriptor for a reduction primitive.
Definition: dnnl.hpp:10552
Descriptor for a logsoftmax forward propagation primitive.
Definition: dnnl.hpp:6072
Eltwise: soft_relu.
Definition: dnnl_types.h:971
vanilla_rnn_backward(const primitive_desc &pd)
Constructs a vanilla RNN backward propagation primitive.
Definition: dnnl.hpp:7841
Unidirectional execution of RNN primitive from right to left.
plain 5D tensor
Definition: dnnl_types.h:182
Descriptor for a pooling backward propagation primitive.
Definition: dnnl.hpp:10173
memory::desc src_desc() const
Returns a source memory descriptor.
Definition: dnnl.hpp:6507
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_attr()
Constructs default (empty) primitive attributes.
Definition: dnnl.hpp:2606
destination engine
Definition: dnnl_types.h:2360
size_t get_size() const
Returns size of the memory descriptor in bytes.
Definition: dnnl.hpp:2016
batch_normalization_backward(const primitive_desc &pd)
Constructs a batch normalization backward propagation primitive.
Definition: dnnl.hpp:6544
Eltwise: square.
Definition: dnnl_types.h:961
memory::desc weights_desc() const
Returns a weights memory descriptor.
Definition: dnnl.hpp:9746
#define DNNL_ARG_DIFF_WEIGHTS_PEEPHOLE
A special mnemonic for diff of RNN weights applied to the peephole weights.
Definition: dnnl_types.h:2259
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:4052
pooling_v2_backward(const primitive_desc &pd)
Constructs a pooling v2 (dilated pooling) backward propagation primitive.
Definition: dnnl.hpp:10292
memory::desc diff_dst_iter_c_desc() const
Returns diff destination recurrent cell state memory descriptor.
Definition: dnnl.hpp:7409
A batch normalization primitive.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6373
An execution stream.
Definition: dnnl.hpp:979
memory::desc diff_bias_desc() const
Returns diff bias memory descriptor.
Definition: dnnl.hpp:9375
Elementwise: exponential linear unit (ELU) (dst for backward)
reduction(const primitive_desc &pd)
Constructs a reduction primitive.
Definition: dnnl.hpp:10590
convolution_backward_weights()=default
Default constructor. Produces an empty object.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:6673
memory::desc diff_weights_iter_desc() const
Returns diff weights iteration memory descriptor.
Definition: dnnl.hpp:7815
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.
memory::desc dst_desc() const
Returns a destination memory descriptor.
Definition: dnnl.hpp:10582
Post-ops.
Definition: dnnl.hpp:2266
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.
pooling_v2_forward(const primitive_desc &pd)
Constructs a pooling v2 (dilated pooling) forward propagation primitive.
Definition: dnnl.hpp:10167
Backward data propagation.
Matrix multiplication (matmul) primitive.
Definition: dnnl.hpp:9670
void set_data_handle(void *handle, const stream &astream) const
Sets the underlying memory buffer.
Definition: dnnl.hpp:2140