Unverified Commit 6e1c6990 authored by Quan (Andy) Gan's avatar Quan (Andy) Gan Committed by GitHub
Browse files

[Build or bug?] Fix VS2019 compilation error in randomwalk GPU kernel (#3788)

* Update randomwalk_gpu.cu

* Update randomwalk_gpu.cu
parent 8425c936
......@@ -110,7 +110,7 @@ std::pair<IdArray, IdArray> RandomWalkUniform(
IdType *traces_data = traces.Ptr<IdType>();
IdType *eids_data = eids.Ptr<IdType>();
GraphKernelData<IdType> h_graphs[num_etypes];
std::vector<GraphKernelData<IdType>> h_graphs(num_etypes);
DGLContext ctx;
for (int64_t etype = 0; etype < num_etypes; ++etype) {
const CSRMatrix &csr = hg->GetCSRMatrix(etype);
......@@ -127,7 +127,7 @@ std::pair<IdArray, IdArray> RandomWalkUniform(
device->AllocWorkspace(ctx, (num_etypes) * sizeof(GraphKernelData<IdType>)));
auto d_metapath_data = metapath_data;
// copy graph metadata pointers to GPU
device->CopyDataFromTo(h_graphs, 0, d_graphs, 0,
device->CopyDataFromTo(h_graphs.data(), 0, d_graphs, 0,
(num_etypes) * sizeof(GraphKernelData<IdType>),
DGLContext{kDLCPU, 0},
ctx,
......
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