Skip to content

Commit

Permalink
fix build of onnxruntime/contrib_ops/cuda/transformers/greedy_search.cc
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffdaily committed Oct 9, 2023
1 parent a227096 commit be62e26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions onnxruntime/contrib_ops/cuda/transformers/greedy_search.cc
Original file line number Diff line number Diff line change
Expand Up @@ -48,10 +48,12 @@ GreedySearch::GreedySearch(const OpKernelInfo& info)

SetConsoleDumper(&g_cuda_dumper_greedysearch);

#ifndef USE_ROCM
cuda_device_prop_ = &reinterpret_cast<const CUDAExecutionProvider*>(info.GetExecutionProvider())->GetDeviceProp();

cuda_device_arch_ = static_cast<const cudaDeviceProp*>(cuda_device_prop_)->major * 100 +
static_cast<const cudaDeviceProp*>(cuda_device_prop_)->minor * 10;
#endif
}

Status GreedySearch::ComputeInternal(OpKernelContext* context) const {
Expand Down

0 comments on commit be62e26

Please sign in to comment.