Commit 39d89ede authored by Artur Wojcik's avatar Artur Wojcik
Browse files

temp3

parent 2a72a179
......@@ -75,7 +75,18 @@ struct random_uniform
result.visit([&](auto output) {
using type = typename decltype(output)::value_type;
if constexpr(std::is_integral<type>{})
if constexpr(std::is_integral_v<type>
#ifdef _MSC_VER
// According to the C++ specification, the effect is undefined if the result type for
// the generator is not one of short, int, long, long long, unsigned short, unsigned int,
// unsigned long, or unsigned long long.
// See https://en.cppreference.com/w/cpp/numeric/random/uniform_int_distribution.
//
// The standard library of Microsoft Visual C++ compiler is strict about that.
// The Clang C++ compiler uses the standard library from Microsoft Visual C++ compiler.
&& !(std::is_same_v<type, unsigned char> || std::is_same_v<type, signed char>)
#endif
)
{
// default range for all integer types is
// (0, std::uniform_int_distribution<type>::max()).
......
......@@ -64,6 +64,7 @@ shape compute_padded_shape(const shape& input,
// Used for dynamic auto padding of pooling operators where padding needs to be computed at
// evaulation time.
MIGRAPHX_EXPORT
shape compute_padded_pool_shape(const shape& input,
const shape& kernel,
const std::vector<std::size_t>& padding,
......
......@@ -85,6 +85,7 @@ add_library(migraphx_device
device/reverse.cpp
device/rnn_variable_seq_lens.cpp
device/scatter.cpp
device/targets.cpp
device/topk.cpp)
set_target_properties(migraphx_device PROPERTIES EXPORT_NAME device)
......
......@@ -366,10 +366,7 @@ bool hip_has_flags(const std::vector<std::string>& flags)
join_strings(flags, " ") + " -x hip -c --offload-arch=gfx900 --cuda-device-only";
std::string src;
src_file input;
input.path = "main.cpp";
input.content = std::make_pair(src.data(), src.data() + src.size());
src_file input{ "main.cpp", src };
try
{
compiler.compile({input});
......
......@@ -24,7 +24,7 @@
#ifndef MIGRAPHX_GUARD_DEVICE_TARGETS_CPP
#define MIGRAPHX_GUARD_DEVICE_TARGETS_CPP
#include <migraphx/config.hpp>
#include <migraphx/gpu/device/config.hpp>
#include <string>
#include <vector>
......@@ -34,9 +34,13 @@ namespace gpu {
namespace device {
#define MIGRAPHX_GPU_TARGETS "@GPU_TARGETS@" // NOLINT
MIGRAPHX_DEVICE_EXPORT
const std::vector<std::string>& get_targets();
MIGRAPHX_DEVICE_EXPORT
std::string get_targets_as_string();
MIGRAPHX_DEVICE_EXPORT
std::string get_device_name();
} // namespace device
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment