Unverified Commit 0016f6ac authored by ltqin's avatar ltqin Committed by GitHub
Browse files

Merge pull request #574 from ROCmSoftwarePlatform/attn-fwd-train-dropout

fixed bug in philox_rand.hpp
parents 0e7aeef5 cb2d4dbb
...@@ -109,12 +109,9 @@ class philox ...@@ -109,12 +109,9 @@ class philox
__device__ uint2 u32_high_low_multi(const unsigned int a, const unsigned int b) __device__ uint2 u32_high_low_multi(const unsigned int a, const unsigned int b)
{ {
uint2* res; uint2* res;
uint2 tmp_res; unsigned long long tmp;
asm("v_mul_hi_u32 %0, %2, %3\n\t" tmp = static_cast<unsigned long long>(a) * b;
"v_mul_lo_u32 %1, %2, %3\n\t" res = reinterpret_cast<uint2*>(&tmp);
: "=v"(tmp_res.x), "=v"(tmp_res.y)
: "v"(a), "v"(b));
res = &tmp_res;
return *res; return *res;
} }
......
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