Skip to content

Commit

Permalink
strange compile error
Browse files Browse the repository at this point in the history
  • Loading branch information
chenfucn committed Jul 2, 2024
1 parent 47893b3 commit 3fc508c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
1 change: 0 additions & 1 deletion onnxruntime/contrib_ops/cuda/quantization/matmul_nbits.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
namespace onnxruntime {
namespace contrib {
namespace cuda {
using namespace onnxruntime::cuda;

template <typename T>
class MatMulNBits final : public CudaKernel {
Expand Down
7 changes: 6 additions & 1 deletion onnxruntime/core/optimizer/gpu_ops_prepack.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
// 3. The logic of prepacking depends on underlying GPU
// hardware. Currently this part is hard-coded for SM80.

#if defined(USE_CUDA) && !defined(USE_ROCM)

#include "core/graph/graph_utils.h"
#include "core/optimizer/initializer.h"
#include "core/optimizer/gpu_ops_prepack.h"
Expand All @@ -48,7 +50,8 @@ inline Status GetOrtValue(const NodeArg* arg, const Graph& graph, OrtValue& ort_
ORT_RETURN_IF_NOT(graph.GetInitializedTensor(arg->Name(), tensor_proto),
"Missing initializer for ", arg->Name());

const auto path_str = graph.ModelPath().ToPathString();
const onnxruntime::Path& graph_path = graph.ModelPath();
const auto path_str = graph_path.ToPathString();

return utils::TensorProtoToOrtValue(
Env::Default(), path_str.c_str(), *tensor_proto,
Expand Down Expand Up @@ -322,3 +325,5 @@ Status GpuOpsPrepack::ApplyImpl(Graph& graph, bool& modified, int graph_level, c
}

} // namespace onnxruntime

#endif // USE_CUDA && !USE_ROCM
4 changes: 4 additions & 0 deletions onnxruntime/core/optimizer/gpu_ops_prepack.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.

#if defined(USE_CUDA) && !defined(USE_ROCM)

#pragma once

#include "core/optimizer/graph_transformer.h"
Expand All @@ -22,3 +24,5 @@ class GpuOpsPrepack : public GraphTransformer {
};

} // namespace onnxruntime

#endif // USE_CUDA && !USE_ROCM

0 comments on commit 3fc508c

Please sign in to comment.