Skip to content

Commit

Permalink
Revert "added error codes for alpha,beta"
Browse files Browse the repository at this point in the history
This reverts commit 95b718e.
  • Loading branch information
Mayank Daga committed Sep 13, 2017
1 parent b133be5 commit a7d480b
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/ocl/activ_ocl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ miopenStatus_t ActivationDescriptor::Forward(Handle& handle,
if(!float_equal(*(static_cast<const float*>(alpha)), 1.0) ||
!float_equal(*(static_cast<const float*>(beta)), 0))
{
MIOPEN_THROW(miopenStatusNotImplemented, "Only alpha=1 and beta=0 is supported");
MIOPEN_THROW("Only alpha=1 and beta=0 is supported");
}
miopenStatus_t status = miopenStatusSuccess;

Expand Down Expand Up @@ -130,7 +130,7 @@ miopenStatus_t ActivationDescriptor::Backward(Handle& handle,
if(!float_equal(*(static_cast<const float*>(alpha)), 1.0) ||
!float_equal(*(static_cast<const float*>(beta)), 0))
{
MIOPEN_THROW(miopenStatusNotImplemented, "Only alpha=1 and beta=0 is supported");
MIOPEN_THROW("Only alpha=1 and beta=0 is supported");
}
miopenStatus_t status = miopenStatusSuccess;

Expand Down
6 changes: 3 additions & 3 deletions src/ocl/convolutionocl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1119,7 +1119,7 @@ void ConvolutionDescriptor::ConvolutionBackwardData(Handle& handle,
if(!float_equal(*(static_cast<const float*>(alpha)), 1.0) ||
!float_equal(*(static_cast<const float*>(beta)), 0))
{
MIOPEN_THROW(miopenStatusNotImplemented, "Only alpha=1 and beta=0 is supported");
MIOPEN_THROW("Only alpha=1 and beta=0 is supported");
}

if(mode == miopenConvolution)
Expand Down Expand Up @@ -1697,7 +1697,7 @@ void ConvolutionDescriptor::ConvolutionBackwardWeights(Handle& handle,
if(!float_equal(*(static_cast<const float*>(alpha)), 1.0) ||
!float_equal(*(static_cast<const float*>(beta)), 0))
{
MIOPEN_THROW(miopenStatusNotImplemented, "Only alpha=1 and beta=0 is supported");
MIOPEN_THROW("Only alpha=1 and beta=0 is supported");
}

int in_n, in_c, in_h, in_w;
Expand Down Expand Up @@ -1948,7 +1948,7 @@ void ConvolutionBackwardBias(Handle& handle,
if(!float_equal(*(static_cast<const float*>(alpha)), 1.0) ||
!float_equal(*(static_cast<const float*>(beta)), 0))
{
MIOPEN_THROW(miopenStatusNotImplemented, "Only alpha=1 and beta=0 is supported");
MIOPEN_THROW("Only alpha=1 and beta=0 is supported");
}

int out_n, out_c, out_h, out_w, stride_n, stride_c, stride_h, stride_w;
Expand Down
4 changes: 2 additions & 2 deletions src/ocl/lrn_ocl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ miopenStatus_t LRNDescriptor::Forward(Handle& handle,
if(!float_equal(*(static_cast<const float*>(alpha)), 1.0) ||
!float_equal(*(static_cast<const float*>(beta)), 0))
{
MIOPEN_THROW(miopenStatusNotImplemented, "Only alpha=1 and beta=0 is supported");
MIOPEN_THROW("Only alpha=1 and beta=0 is supported");
}
miopenStatus_t status = miopenStatusSuccess;
mlo_construct_norm construct_params(1); // forward
Expand Down Expand Up @@ -147,7 +147,7 @@ miopenStatus_t LRNDescriptor::Backward(Handle& handle,
if(!float_equal(*(static_cast<const float*>(alpha)), 1.0) ||
!float_equal(*(static_cast<const float*>(beta)), 0))
{
MIOPEN_THROW(miopenStatusNotImplemented, "Only alpha=1 and beta=0 is supported");
MIOPEN_THROW("Only alpha=1 and beta=0 is supported");
}

miopenStatus_t status = miopenStatusSuccess;
Expand Down
4 changes: 2 additions & 2 deletions src/ocl/pooling_ocl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ miopenStatus_t PoolingDescriptor::Forward(Handle& handle,
if(!float_equal(*(static_cast<const float*>(alpha)), 1.0) ||
!float_equal(*(static_cast<const float*>(beta)), 0))
{
MIOPEN_THROW(miopenStatusNotImplemented, "Only alpha=1 and beta=0 is supported");
MIOPEN_THROW("Only alpha=1 and beta=0 is supported");
}
mlo_construct_pooling2D construct_params(1); // forward

Expand Down Expand Up @@ -136,7 +136,7 @@ miopenStatus_t PoolingDescriptor::Backward(Handle& handle,
if(!float_equal(*(static_cast<const float*>(alpha)), 1.0) ||
!float_equal(*(static_cast<const float*>(beta)), 0))
{
MIOPEN_THROW(miopenStatusNotImplemented, "Only alpha=1 and beta=0 is supported");
MIOPEN_THROW("Only alpha=1 and beta=0 is supported");
}
miopenStatus_t status = miopenStatusSuccess;
mlo_construct_pooling2D construct_params(0); // backward
Expand Down
4 changes: 2 additions & 2 deletions src/ocl/softmaxocl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ miopenStatus_t SoftmaxForward(
if(!float_equal(*(static_cast<const float*>(alpha)), 1.0) ||
!float_equal(*(static_cast<const float*>(beta)), 0))
{
MIOPEN_THROW(miopenStatusNotImplemented, "Only alpha=1 and beta=0 is supported");
MIOPEN_THROW("Only alpha=1 and beta=0 is supported");
}
int n, c, h, w;
std::tie(n, c, h, w) = tie4(yDesc.GetLengths());
Expand Down Expand Up @@ -122,7 +122,7 @@ miopenStatus_t SoftmaxBackward(Handle& handle,
if(!float_equal(*(static_cast<const float*>(alpha)), 1.0) ||
!float_equal(*(static_cast<const float*>(beta)), 0))
{
MIOPEN_THROW(miopenStatusNotImplemented, "Only alpha=1 and beta=0 is supported");
MIOPEN_THROW("Only alpha=1 and beta=0 is supported");
}

int n, c, h, w;
Expand Down

0 comments on commit a7d480b

Please sign in to comment.