Fix explicit cast required

This is required for PyTorch which runs into an issue with narrowing types. Requires an explicit cast.

[ROCm/hip commit: 4ddb81424f]
Tento commit je obsažen v:
Aaron Enye Shi
2018-07-20 16:34:15 -04:00
odevzdal GitHub
rodič 75202e732d
revize 89a00bc280
+1 -1
Zobrazit soubor
@@ -123,7 +123,7 @@ THE SOFTWARE.
typename std::enable_if<
(rank > 1) && sizeof...(Us) == rank>::type* = nullptr>
__host__ __device__
HIP_vector_type(Us... xs) noexcept { data = Native_vec_{xs...}; }
HIP_vector_type(Us... xs) noexcept { data = Native_vec_{static_cast<T>(xs)...}; }
__host__ __device__
HIP_vector_type(const HIP_vector_type&) = default;
__host__ __device__