text
stringlengths
0
2.2M
{P::SCALES | P::COMMON | P::RUNTIME,
{P::ZERO_POINTS | P::SRC | P::PER_N | P::RUNTIME, P::NONE,
P::ZERO_POINTS | P::DST | P::PER_N | P::RUNTIME}}});
// post-ops
cases.push_back({{{{10, 1}, src_dt, tag::ab},
{{1, 20}, data_type::s8, tag::ab},
{{10, 20}, dst_dt, tag::ab}},
{P::NONE, {},
{{primitive::kind::eltwise, algorithm::eltwise_relu}}}});
// multiple post-ops
cases.push_back(
{{{{10, 2}, src_dt, tag::ab}, {{2, 20}, data_type::s8, tag::ab},
{{10, 20}, dst_dt, tag::ab}, data_type::f32},
{P::SCALES | P::COMMON, {},
{{primitive::kind::sum},
{primitive::kind::eltwise,
algorithm::eltwise_relu}}}});
// igemm like: output scale + post-ops(sum)
cases.push_back({{{{10, 1}, src_dt, tag::ab},
{{1, 20}, data_type::s8, tag::ab},
{{10, 20}, dst_dt, tag::ab}, data_type::s8},
{P::SCALES | P::COMMON,
{P::ZERO_POINTS | P::SRC | P::COMMON, P::NONE,
P::ZERO_POINTS | P::DST | P::COMMON | P::RUNTIME},
{{primitive::kind::sum}}}});
// igemm like: output scale + post-ops(sum) + all runtime
cases.push_back({{{{10, 2}, src_dt, tag::ba},
{{2, 20}, data_type::s8, tag::ba},
{{10, 20}, dst_dt, tag::ab}, data_type::s8},
{P::SCALES | P::PER_N | P::RUNTIME,
{P::ZERO_POINTS | P::SRC | P::COMMON | P::RUNTIME,
P::ZERO_POINTS | P::WEIGHTS | P::COMMON
| P::RUNTIME,
P::ZERO_POINTS | P::DST | P::COMMON | P::RUNTIME},
{{primitive::kind::sum}}}});
return ::testing::ValuesIn(cases);
};
INSTANTIATE_TEST_SUITE_P(
Generic_s8s8s32, iface, cases_x8(data_type::s8, data_type::s32));
INSTANTIATE_TEST_SUITE_P(
Generic_u8s8u8, iface, cases_x8(data_type::u8, data_type::u8));
INSTANTIATE_TEST_SUITE_P(TensorDims, attr_test_t,
::testing::Values(
// {{src0, src1, dst same_dim}, { binary post-op dim }},
// format_tag, post-op data type, ndims
std::make_tuple(memory::dims {3, 2, 16, 16},
memory::dims {3, 1, 16, 16}, tag::abcd,
memory::data_type::f32, 4),
std::make_tuple(memory::dims {9, 9, 64, 64},
memory::dims {9, 1, 64, 64}, tag::abcd,
memory::data_type::f32, 4),
std::make_tuple(memory::dims {3, 2, 16, 16},
memory::dims {3, 2, 16, 16}, tag::abcd,
memory::data_type::f32, 4),
std::make_tuple(memory::dims {2, 10, 10, 10},
memory::dims {2, 10, 10, 10}, tag::abcd,
memory::data_type::bf16, 4)));
} // namespace dnnl
#include "UsingWsService.h"
#include "../common/TestMsgJsonSerializer.h"
#include <ichor/DependencyManager.h>
#include <ichor/optional_bundles/logging_bundle/LoggerAdmin.h>
#include <ichor/optional_bundles/network_bundle/ws/WsHostService.h>
#include <ichor/optional_bundles/network_bundle/ws/WsConnectionService.h>
#include <ichor/optional_bundles/network_bundle/ClientAdmin.h>
#include <ichor/optional_bundles/serialization_bundle/SerializationAdmin.h>
#ifdef ICHOR_USE_SPDLOG
#include <ichor/optional_bundles/logging_bundle/SpdlogFrameworkLogger.h>
#include <ichor/optional_bundles/logging_bundle/SpdlogLogger.h>
#define FRAMEWORK_LOGGER_TYPE SpdlogFrameworkLogger
#define LOGGER_TYPE SpdlogLogger
#else
#include <ichor/optional_bundles/logging_bundle/CoutFrameworkLogger.h>
#include <ichor/optional_bundles/logging_bundle/CoutLogger.h>
#define FRAMEWORK_LOGGER_TYPE CoutFrameworkLogger
#define LOGGER_TYPE CoutLogger
#endif
#include <chrono>
#include <iostream>
using namespace std::string_literals;
using namespace Ichor;
int main() {
std::locale::global(std::locale("en_US.UTF-8"));
auto start = std::chrono::steady_clock::now();
DependencyManager dm{};
dm.createServiceManager<FRAMEWORK_LOGGER_TYPE, IFrameworkLogger>({}, 10);
#ifdef ICHOR_USE_SPDLOG
dm.createServiceManager<SpdlogSharedService, ISpdlogSharedService>();
#endif