Skip to content

Commit

Permalink
Merge pull request #626 from qulacs/625-haar_random_bug
Browse files Browse the repository at this point in the history
Haar_random_state GPU bug
  • Loading branch information
KowerKoint committed Mar 26, 2024
2 parents 62209fd + 9017c48 commit 6737fc8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gpusim/memory_ops.cu
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "cuda_runtime.h"
#include "device_launch_parameters.h"
//#include <cuda.h>
// #include <cuda.h>
#include <assert.h>
#include <cuComplex.h>
#include <curand.h>
Expand Down Expand Up @@ -144,7 +144,7 @@ __host__ void initialize_Haar_random_state_with_seed_host(void* state,
// CURAND_RNG_PSEUDO_MT19937 offset cannot be used and need sm_35 or higher.

unsigned int block = dim <= 512 ? dim : 512;
unsigned int grid = min((int)(dim / block), 512);
unsigned int grid = dim / block;

init_rnd<<<grid, block, 0, *cuda_stream>>>(rnd_state, seed);
checkCudaErrors(cudaGetLastError(), __FILE__, __LINE__);
Expand Down

0 comments on commit 6737fc8

Please sign in to comment.