#ifndef GPU_GPU_BATCH_NORMALIZATION_PD_HPP
#define GPU_GPU_BATCH_NORMALIZATION_PD_HPP
#include <assert.h>
#include "common/batch_normalization_pd.hpp"
#include "common/c_types_map.hpp"
#include "common/type_helpers.hpp"
#include "common/utils.hpp"
namespace dnnl {
namespace impl {
namespace gpu {
namespace {
template <typename pd_t>
inline status_t gpu_init_default_ws(pd_t *self, memory_desc_t &ws_md) {
auto mdw = memory_desc_wrapper(self->src_md(0));
ws_md = *mdw.md_;
ws_md.data_type = data_type::s8;
return status::success;
}
}
struct gpu_batch_normalization_fwd_pd_t : public batch_normalization_fwd_pd_t {
using batch_normalization_fwd_pd_t::batch_normalization_fwd_pd_t;
protected:
status_t init_default_ws(size_t bits_per_element) override {
UNUSED(bits_per_element);
return gpu_init_default_ws(this, ws_md_);
}
};
struct gpu_batch_normalization_bwd_pd_t : public batch_normalization_bwd_pd_t {
using batch_normalization_bwd_pd_t::batch_normalization_bwd_pd_t;
status_t init_default_ws(size_t bits_per_element) override {
UNUSED(bits_per_element);
return gpu_init_default_ws(this, ws_md_);
}
};
} } }
#endif