-
Notifications
You must be signed in to change notification settings - Fork 18.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
replace cuDNN alphas and betas with coefficient values
Give cuDNN {0, 1} constants for controlling accumulation through the alpha and beta coefficients.
- Loading branch information
Showing
8 changed files
with
65 additions
and
85 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#ifdef USE_CUDNN | ||
#include "caffe/util/cudnn.hpp" | ||
|
||
namespace caffe { | ||
namespace cudnn { | ||
|
||
float dataType<float>::oneval = 1.0; | ||
float dataType<float>::zeroval = 0.0; | ||
const void* dataType<float>::one = | ||
static_cast<void *>(&dataType<float>::oneval); | ||
const void* dataType<float>::zero = | ||
static_cast<void *>(&dataType<float>::zeroval); | ||
|
||
double dataType<double>::oneval = 1.0; | ||
double dataType<double>::zeroval = 0.0; | ||
const void* dataType<double>::one = | ||
static_cast<void *>(&dataType<double>::oneval); | ||
const void* dataType<double>::zero = | ||
static_cast<void *>(&dataType<double>::zeroval); | ||
|
||
} // namespace cudnn | ||
} // namespace caffe | ||
#endif |