Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

half: fix compiling with HIP SDK 5.7+ on Windows #2363

Merged
merged 4 commits into from
Oct 26, 2023
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion driver/driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef GUARD_MIOPEN_DRIVER_HPP
#define GUARD_MIOPEN_DRIVER_HPP

#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion driver/reduce_driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
#include <string>
#include <cassert>
#include <type_traits>
#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <initializer_list>
#include <cstdlib>
#include <stdlib.h>
#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#include <initializer_list>
#include <cstdlib>
#include <stdlib.h>
#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/fusion.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
#include <ios>
#include <algorithm>
#include <string>
#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/gemm_v2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#endif

#if MIOPEN_USE_ROCBLAS
#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/include/miopen/op_kernel_args.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include <type_traits>
#include <cstdint>
#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/include/miopen/reduce_common.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef GUARD_MIOPEN_REDUCE_COMMON_HPP
#define GUARD_MIOPEN_REDUCE_COMMON_HPP

#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/include/miopen/visit_float.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#define GUARD_MLOPEN_VISIT_FLOAT_HPP

#include <miopen/miopen.h>
#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/solver/conv_asm_1x1u_bias_activ_fused.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#include <miopen/fusion/solvers.hpp>
#include <miopen/fusion/fusion_invoke_params.hpp>

#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion src/solver/conv_ocl_dir2Dfwd_exhaustive_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <miopen/legacy_exhaustive_search.hpp>
#include <miopen/bfloat16.hpp>
#include <miopen/fusion/fusion_invoke_params.hpp>
#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/cpu_reduce_util.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#ifndef GUARD_CPU_REDUCE_UTIL_HPP
#define GUARD_CPU_REDUCE_UTIL_HPP

#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/driver.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

#include <functional>
#include <deque>
#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/gpu_reference_kernel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <cstdlib>
#include <ctime>
#include <type_traits>
#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/serialize.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

#include <miopen/rank.hpp>
#include <miopen/each_args.hpp>
#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down
2 changes: 1 addition & 1 deletion test/tensor_holder.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@

#include "serialize.hpp"

#if HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL
#if !defined(_WIN32) && (HIP_PACKAGE_VERSION_FLAT >= 5006000000ULL)
#include <half/half.hpp>
#else
#include <half.hpp>
Expand Down