diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md index 7b39f7902152f..b09a665547e76 100644 --- a/.github/pull_request_template.md +++ b/.github/pull_request_template.md @@ -2,22 +2,19 @@ Related issue = # +- If the PR does not belong to any existing issue, free to leave it blank. +--> [[Click here for the format server]](http://kun.csail.mit.edu:31415/) diff --git a/taichi/runtime/llvm/runtime.cpp b/taichi/runtime/llvm/runtime.cpp index 8b3b6365f6a88..2f1d4e2f31f8d 100644 --- a/taichi/runtime/llvm/runtime.cpp +++ b/taichi/runtime/llvm/runtime.cpp @@ -1466,7 +1466,7 @@ f32 cuda_rand_f32(Context *context) { return cuda_rand_u32(context) * (1.0f / 4294967296.0f); } -f32 cuda_rand_f64(Context *context) { +f64 cuda_rand_f64(Context *context) { return cuda_rand_f32(context); } diff --git a/tests/python/test_random.py b/tests/python/test_random.py index 56c50598dd5d0..aa6d79ab554ce 100644 --- a/tests/python/test_random.py +++ b/tests/python/test_random.py @@ -105,3 +105,12 @@ def gen(i: ti.i32): count += 1 if x[i] == x[i - 1] else 0 assert count <= n * 0.15 + + +@ti.test(arch=[ti.cpu, ti.cuda]) +def test_random_f64(): + @ti.kernel + def foo() -> ti.f64: + return ti.random(dtype=ti.f64) + + foo()