Skip to content

Commit

Permalink
vsmigx/vs_migraphx.cpp: fix compatibility with migx pre-compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
WolframRhodium committed Dec 22, 2024
1 parent 11df3b8 commit 9a26e93
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions vsmigx/vs_migraphx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,12 @@
#include <hip/hip_runtime.h>

#include <migraphx/migraphx.h>

#if __has_include(<migraphx/version.h>)
#include <migraphx/version.h>
#else
#define NO_MIGX_VERSION
#endif

#include "config.h"

Expand Down Expand Up @@ -1019,6 +1024,7 @@ VS_EXTERNAL_API(void) VapourSynthPluginInit(
auto getVersion = [](const VSMap *, VSMap * out, void *, VSCore *, const VSAPI *vsapi) {
vsapi->propSetData(out, "version", VERSION, -1, paReplace);

#ifndef NO_MIGX_VERSION
vsapi->propSetData(
out, "migraphx_version_build",
(std::to_string(MIGRAPHX_VERSION_MAJOR) +
Expand All @@ -1028,6 +1034,7 @@ VS_EXTERNAL_API(void) VapourSynthPluginInit(
std::to_string(MIGRAPHX_VERSION_PATCH)
).c_str(), -1, paReplace
);
#endif // NO_MIGX_VERSION

int runtime_version;
(void) hipRuntimeGetVersion(&runtime_version);
Expand Down

0 comments on commit 9a26e93

Please sign in to comment.