ROCm / ROCm-CompilerSupport

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

Associate specific values with enumeration constants #1

Closed stuartarchibald closed 5 years ago

stuartarchibald commented 5 years ago

Most of the enums in https://github.com/ROCmSoftwarePlatform/ROCm-CompilerSupport/blob/master/lib/comgr/include/amd_comgr.h do not have specific values associated with the enumeration constants. For example amd_comgr_status_t has values whereas amd_comgr_language_t does not: https://github.com/ROCmSoftwarePlatform/ROCm-CompilerSupport/blob/ee20262b3eeeea8b4474e3c1b6c6f560e8e306a3/lib/comgr/include/amd_comgr.h#L130-L174

This matters if you want to use the library direct from a Python ctypes binding. It is down to the compiler to select the values if not specified and as a result they are not known if just binding directly to the DSO. Any chance they could be added please?

scott-linder commented 5 years ago

All exported enum variants have their values set explicitly now, as of ef7324e9d3f25ca485c84779fa991781cc5db769

stuartarchibald commented 5 years ago

Great, thanks for the fix.