Skip to content

Commit

Permalink
[gpu/stft]: stft_opt: Implemented get_required_device_features_key
Browse files Browse the repository at this point in the history
  • Loading branch information
pkowalc1 committed Feb 3, 2025
1 parent 9b9e8b3 commit bf5f282
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2018-2025 Intel Corporation
// Copyright (C) 2018-2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

Expand Down Expand Up @@ -69,7 +69,7 @@ CommonDispatchData STFTKernelOpt::CalcLaunchConfig(const STFT_params& params) co
}

bool STFTKernelOpt::Validate(const Params& p) const {
if (!STFTKernelBase::Validate(p))
if (STFTKernelBase::Validate(p) == false)
return false;

const auto& params = static_cast<const STFT_params&>(p);
Expand All @@ -81,4 +81,12 @@ bool STFTKernelOpt::Validate(const Params& p) const {
return true;
}

DeviceFeaturesKey STFTKernelOpt::get_required_device_features_key(const Params& params) const {
DeviceFeaturesKey k;
k.requires_subgroups();
k.requires_subgroup_reduce();

return k;
}

} // namespace kernel_selector
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (C) 2018-2025 Intel Corporation
// Copyright (C) 2018-2024 Intel Corporation
// SPDX-License-Identifier: Apache-2.0
//

Expand All @@ -16,6 +16,7 @@ class STFTKernelOpt : public STFTKernelBase {
KernelsPriority GetKernelsPriority(const Params& params) const override;
CommonDispatchData CalcLaunchConfig(const STFT_params& params) const override;
ParamsKey GetSupportedKey() const override;
DeviceFeaturesKey get_required_device_features_key(const Params& params) const override;
bool Validate(const Params& p) const override;
};
} // namespace kernel_selector

0 comments on commit bf5f282

Please sign in to comment.