Skip to content

Commit

Permalink
vsmigx: allow num_streams > 1 (#113)
Browse files Browse the repository at this point in the history
Co-authored-by: Abi Hafshin <[email protected]>
  • Loading branch information
abihf and Abi Hafshin authored Nov 2, 2024
1 parent 5890482 commit afb834c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 2 additions & 0 deletions scripts/vsmlrt.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ class MIGX:
opt_shapes: typing.Optional[typing.Tuple[int, int]] = None
fast_math: bool = True
exhaustive_tune: bool = False
num_streams: int = 1

short_path: typing.Optional[bool] = None # True on Windows by default, False otherwise
custom_env: typing.Dict[str, str] = field(default_factory=lambda: {})
Expand Down Expand Up @@ -2649,6 +2650,7 @@ def _inference(
ret = core.migx.Model(
clips, mxr_path,
device_id=backend.device_id,
num_streams=backend.num_streams,
**kwargs
)
elif isinstance(backend, Backend.OV_NPU):
Expand Down
6 changes: 1 addition & 5 deletions vsmigx/vs_migraphx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -933,10 +933,6 @@ static void VS_CC vsMIGXCreate(
if (num_streams <= 0) {
return set_error("\"num_streams\" must be positive");
}
// TODO
if (num_streams != 1) {
return set_error("\"num_streams\" must be 1 for now");
}

setDimensions(
d->out_vi,
Expand Down Expand Up @@ -1022,7 +1018,7 @@ VS_EXTERNAL_API(void) VapourSynthPluginInit(

auto getVersion = [](const VSMap *, VSMap * out, void *, VSCore *, const VSAPI *vsapi) {
vsapi->propSetData(out, "version", VERSION, -1, paReplace);

vsapi->propSetData(
out, "migraphx_version_build",
(std::to_string(MIGRAPHX_VERSION_MAJOR) +
Expand Down

0 comments on commit afb834c

Please sign in to comment.