diff --git a/csrc/hasktorch_profile.h b/csrc/hasktorch_profile.h
new file mode 100644
--- /dev/null
+++ b/csrc/hasktorch_profile.h
@@ -0,0 +1,5 @@
+// when setting --enable-profiling, PROFILING is defined by GHC. torch uses PROFILING literal. To avoid the confliction, PROFILING is redefined to TORCH_PROFILING.
+#ifdef PROFILING
+#undef PROFILING
+#define PROFILING TORCH_PROFILING
+#endif
diff --git a/libtorch-ffi.cabal b/libtorch-ffi.cabal
--- a/libtorch-ffi.cabal
+++ b/libtorch-ffi.cabal
@@ -1,6 +1,6 @@
 cabal-version:       3.0
 name:                libtorch-ffi
-version:             2.0.1.0
+version:             2.0.1.1
 -- The prefix(2.0) of this version("2.0.0.0") is the same as libtorch's one.
 synopsis:            Haskell bindings for PyTorch
 description:         This package provides Haskell bindings to libtorch, the C++ library underlying PyTorch, specifically designed for the Hasktorch ecosystem.
@@ -184,6 +184,7 @@
  c-sources:            csrc/hasktorch_dump.c
  install-includes:     csrc/hasktorch_finializer.h
                       ,csrc/hasktorch_dump.h
+                      ,csrc/hasktorch_profile.h
  include-dirs:         csrc
 
 test-suite spec
