Path: blob/master/src/utils/style_ops/bias_act.h
809 views
// Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.1//2// NVIDIA CORPORATION and its licensors retain all intellectual property3// and proprietary rights in and to this software, related documentation4// and any modifications thereto. Any use, reproduction, disclosure or5// distribution of this software and related documentation without an express6// license agreement from NVIDIA CORPORATION is strictly prohibited.78//------------------------------------------------------------------------9// CUDA kernel parameters.1011struct bias_act_kernel_params12{13const void* x; // [sizeX]14const void* b; // [sizeB] or NULL15const void* xref; // [sizeX] or NULL16const void* yref; // [sizeX] or NULL17const void* dy; // [sizeX] or NULL18void* y; // [sizeX]1920int grad;21int act;22float alpha;23float gain;24float clamp;2526int sizeX;27int sizeB;28int stepB;29int loopX;30};3132//------------------------------------------------------------------------33// CUDA kernel selection.3435template <class T> void* choose_bias_act_kernel(const bias_act_kernel_params& p);3637//------------------------------------------------------------------------383940