ROCm / ROCm-CompilerSupport

The compiler support repository provides various Lightning Compiler related services.
47 stars 31 forks source link

Comgr deprecated itself 😅 #58

Closed aaronmondal closed 1 year ago

aaronmondal commented 1 year ago

@lamb-j Now that symbols like AMD_COMGR_ACTION_COMPILE_SOURCE_TO_FATBIN are deprecated and the warnings print correctly, I'm getting a bunch of deprecation warnings for compiling comgr.cpp itself.

Maybe a version macro is needed to disable these symbols in comgr.cpp?

INFO: From LlCompileObject external/rules_ll~override~rules_ll_dependencies~comgr/lib/comgr/src/amd_comgr/comgr.o:
external/rules_ll~override~rules_ll_dependencies~comgr/lib/comgr/src/comgr.cpp:173:8: warning: 'AMD_COMGR_ACTION_COMPILE_SOURCE_TO_FATBIN' is deprecated: Will be removed in C
omgr v3.0 (Rocm v6.0). Use AMD_COMGR_ACTION_COMPILE_SOURCE_TO_BC, etc. instead [-Wdeprecated-declarations]
  case AMD_COMGR_ACTION_COMPILE_SOURCE_TO_FATBIN:
       ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:1714:3: note: 'AMD_COMGR_ACTION_COMPILE_SOURCE_TO_FATBIN' has be
en explicitly marked deprecated here
  AMD_COMGR_DEPRECATED("Will be removed in Comgr v3.0 (Rocm v6.0). Use "
  ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:56:50: note: expanded from macro 'AMD_COMGR_DEPRECATED'
#define AMD_COMGR_DEPRECATED(msg) __attribute__((deprecated(msg)))
                                                 ^
external/rules_ll~override~rules_ll_dependencies~comgr/lib/comgr/src/comgr.cpp:194:8: warning: 'AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES' is deprecated: Will be removed in Comgr
 v3.0 (Rocm v6.0). Use AMD_COMGR_ACTION_COMPILE_SOURCE_WITH_DEVICE_LIBS_TO_BC instead [-Wdeprecated-declarations]
  case AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES:
       ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:1563:3: note: 'AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES' has been e
xplicitly marked deprecated here
  AMD_COMGR_DEPRECATED("Will be removed in Comgr v3.0 (Rocm v6.0). Use "
  ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:56:50: note: expanded from macro 'AMD_COMGR_DEPRECATED'
#define AMD_COMGR_DEPRECATED(msg) __attribute__((deprecated(msg)))
                                                 ^
external/rules_ll~override~rules_ll_dependencies~comgr/lib/comgr/src/comgr.cpp:209:8: warning: 'AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES' is deprecated: Will be removed in Comgr
 v3.0 (Rocm v6.0). Use AMD_COMGR_ACTION_COMPILE_SOURCE_WITH_DEVICE_LIBS_TO_BC instead [-Wdeprecated-declarations]
  case AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES:
       ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:1563:3: note: 'AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES' has been e
xplicitly marked deprecated here
  AMD_COMGR_DEPRECATED("Will be removed in Comgr v3.0 (Rocm v6.0). Use "
  ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:56:50: note: expanded from macro 'AMD_COMGR_DEPRECATED'
#define AMD_COMGR_DEPRECATED(msg) __attribute__((deprecated(msg)))
                                                 ^
external/rules_ll~override~rules_ll_dependencies~comgr/lib/comgr/src/comgr.cpp:231:8: warning: 'AMD_COMGR_ACTION_COMPILE_SOURCE_TO_FATBIN' is deprecated: Will be removed in C
omgr v3.0 (Rocm v6.0). Use AMD_COMGR_ACTION_COMPILE_SOURCE_TO_BC, etc. instead [-Wdeprecated-declarations]
  case AMD_COMGR_ACTION_COMPILE_SOURCE_TO_FATBIN:
       ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:1714:3: note: 'AMD_COMGR_ACTION_COMPILE_SOURCE_TO_FATBIN' has be
en explicitly marked deprecated here
  AMD_COMGR_DEPRECATED("Will be removed in Comgr v3.0 (Rocm v6.0). Use "
  ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:56:50: note: expanded from macro 'AMD_COMGR_DEPRECATED'
#define AMD_COMGR_DEPRECATED(msg) __attribute__((deprecated(msg)))
                                                 ^
external/rules_ll~override~rules_ll_dependencies~comgr/lib/comgr/src/comgr.cpp:1320:25: warning: 'AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES' is deprecated: Will be removed in Com
gr v3.0 (Rocm v6.0). Use AMD_COMGR_ACTION_COMPILE_SOURCE_WITH_DEVICE_LIBS_TO_BC instead [-Wdeprecated-declarations]
          ActionKind == AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES)) {
                        ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:1563:3: note: 'AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES' has been e
xplicitly marked deprecated here
  AMD_COMGR_DEPRECATED("Will be removed in Comgr v3.0 (Rocm v6.0). Use "
  ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:56:50: note: expanded from macro 'AMD_COMGR_DEPRECATED'
#define AMD_COMGR_DEPRECATED(msg) __attribute__((deprecated(msg)))
                                                 ^
external/rules_ll~override~rules_ll_dependencies~comgr/lib/comgr/src/comgr.cpp:1347:10: warning: 'AMD_COMGR_ACTION_COMPILE_SOURCE_TO_FATBIN' is deprecated: Will be removed in
 Comgr v3.0 (Rocm v6.0). Use AMD_COMGR_ACTION_COMPILE_SOURCE_TO_BC, etc. instead [-Wdeprecated-declarations]
    case AMD_COMGR_ACTION_COMPILE_SOURCE_TO_FATBIN:
         ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:1714:3: note: 'AMD_COMGR_ACTION_COMPILE_SOURCE_TO_FATBIN' has be
en explicitly marked deprecated here
  AMD_COMGR_DEPRECATED("Will be removed in Comgr v3.0 (Rocm v6.0). Use "
  ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:56:50: note: expanded from macro 'AMD_COMGR_DEPRECATED'
#define AMD_COMGR_DEPRECATED(msg) __attribute__((deprecated(msg)))
                                                 ^
external/rules_ll~override~rules_ll_dependencies~comgr/lib/comgr/src/comgr.cpp:1353:10: warning: 'AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES' is deprecated: Will be removed in Com
gr v3.0 (Rocm v6.0). Use AMD_COMGR_ACTION_COMPILE_SOURCE_WITH_DEVICE_LIBS_TO_BC instead [-Wdeprecated-declarations]
    case AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES:
         ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:1563:3: note: 'AMD_COMGR_ACTION_ADD_DEVICE_LIBRARIES' has been e
xplicitly marked deprecated here
  AMD_COMGR_DEPRECATED("Will be removed in Comgr v3.0 (Rocm v6.0). Use "
  ^
bazel-out/k8-fastbuild/bin/external/rules_ll~override~rules_ll_dependencies~comgr/comgr/amd_comgr/amd_comgr.h:56:50: note: expanded from macro 'AMD_COMGR_DEPRECATED'
#define AMD_COMGR_DEPRECATED(msg) __attribute__((deprecated(msg)))
                                                 ^
7 warnings generated.
lamb-j commented 1 year ago

@aaronmondal Good suggestion! I'm hoping to have all of these removed in the near future with Rocm v6. But in the meantime, it is a bit annoying to see them every time we build Comgr.

I've put together a patch to disable the warnings when building Comgr (although we still get some when building the tests, which feels appropriate). I'll post a link here once it makes it's way to github.

Thanks

aaronmondal commented 1 year ago

Fixed by https://github.com/RadeonOpenCompute/ROCm-CompilerSupport/commit/4867f5ef57898266ba8ee7c00c167dc3b8ff6186. rules_ll adds it in https://github.com/eomii/rules_ll/commit/8771e4956e399890acc81a2d320c438dfe70317c. Thanks a lot!