"...composable_kernel_onnxruntime.git" did not exist on "aebd211c363324ec8be401f17fe815e21da59081"
Commit b20487d3 authored by Artur Wojcik's avatar Artur Wojcik
Browse files

temp3

parent 5c426ab4
...@@ -75,7 +75,18 @@ struct random_uniform ...@@ -75,7 +75,18 @@ struct random_uniform
result.visit([&](auto output) { result.visit([&](auto output) {
using type = typename decltype(output)::value_type; 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 // default range for all integer types is
// (0, std::uniform_int_distribution<type>::max()). // (0, std::uniform_int_distribution<type>::max()).
......
...@@ -64,6 +64,7 @@ shape compute_padded_shape(const shape& input, ...@@ -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 // Used for dynamic auto padding of pooling operators where padding needs to be computed at
// evaulation time. // evaulation time.
MIGRAPHX_EXPORT
shape compute_padded_pool_shape(const shape& input, shape compute_padded_pool_shape(const shape& input,
const shape& kernel, const shape& kernel,
const std::vector<std::size_t>& padding, const std::vector<std::size_t>& padding,
......
...@@ -88,6 +88,7 @@ add_library(migraphx_device ...@@ -88,6 +88,7 @@ add_library(migraphx_device
device/reverse.cpp device/reverse.cpp
device/rnn_variable_seq_lens.cpp device/rnn_variable_seq_lens.cpp
device/scatter.cpp device/scatter.cpp
device/targets.cpp
device/topk.cpp) device/topk.cpp)
set_target_properties(migraphx_device PROPERTIES EXPORT_NAME device) set_target_properties(migraphx_device PROPERTIES EXPORT_NAME device)
......
...@@ -366,10 +366,7 @@ bool hip_has_flags(const std::vector<std::string>& flags) ...@@ -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"; join_strings(flags, " ") + " -x hip -c --offload-arch=gfx900 --cuda-device-only";
std::string src; std::string src;
src_file input; src_file input{ "main.cpp", src };
input.path = "main.cpp";
input.content = std::make_pair(src.data(), src.data() + src.size());
try try
{ {
compiler.compile({input}); compiler.compile({input});
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
#ifndef MIGRAPHX_GUARD_DEVICE_TARGETS_CPP #ifndef MIGRAPHX_GUARD_DEVICE_TARGETS_CPP
#define MIGRAPHX_GUARD_DEVICE_TARGETS_CPP #define MIGRAPHX_GUARD_DEVICE_TARGETS_CPP
#include <migraphx/config.hpp> #include <migraphx/gpu/device/config.hpp>
#include <string> #include <string>
#include <vector> #include <vector>
...@@ -34,9 +34,13 @@ namespace gpu { ...@@ -34,9 +34,13 @@ namespace gpu {
namespace device { namespace device {
#define MIGRAPHX_GPU_TARGETS "@GPU_TARGETS@" // NOLINT #define MIGRAPHX_GPU_TARGETS "@GPU_TARGETS@" // NOLINT
MIGRAPHX_DEVICE_EXPORT
const std::vector<std::string>& get_targets(); const std::vector<std::string>& get_targets();
MIGRAPHX_DEVICE_EXPORT
std::string get_targets_as_string(); std::string get_targets_as_string();
MIGRAPHX_DEVICE_EXPORT
std::string get_device_name(); std::string get_device_name();
} // namespace device } // 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