Skip to content

Commit

Permalink
[Runtime] Add "TVM_DLL" to NVTX header
Browse files Browse the repository at this point in the history
This PR adds the `TVM_DLL` attribute to the nvtx header for windows
build.
  • Loading branch information
MasterJH5574 committed Mar 28, 2024
1 parent 2955bc6 commit 3117505
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions include/tvm/runtime/nvtx.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
#ifndef TVM_RUNTIME_NVTX_H_
#define TVM_RUNTIME_NVTX_H_

#include <tvm/runtime/c_runtime_api.h>

#include <string>
namespace tvm {
namespace runtime {
Expand All @@ -29,11 +31,11 @@ namespace runtime {
class NVTXScopedRange {
public:
/*! \brief Enter an NVTX scoped range */
explicit NVTXScopedRange(const char* name);
TVM_DLL explicit NVTXScopedRange(const char* name);
/*! \brief Enter an NVTX scoped range */
explicit NVTXScopedRange(const std::string& name) : NVTXScopedRange(name.c_str()) {}
/*! \brief Exist an NVTX scoped range */
~NVTXScopedRange();
TVM_DLL ~NVTXScopedRange();
NVTXScopedRange(const NVTXScopedRange& other) = delete;
NVTXScopedRange(NVTXScopedRange&& other) = delete;
NVTXScopedRange& operator=(const NVTXScopedRange& other) = delete;
Expand Down

0 comments on commit 3117505

Please sign in to comment.