Commit f036d425 authored by Rostyslav Geyyer's avatar Rostyslav Geyyer
Browse files

Add exceptions if argument is not supported

parent 7fd0378a
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <iomanip> #include <iomanip>
#include <vector> #include <vector>
#include <iostream> #include <iostream>
#include <stdexcept>
#include "ck/ck.hpp" #include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp" #include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
...@@ -163,6 +164,11 @@ int main(int argc, char* argv[]) ...@@ -163,6 +164,11 @@ int main(int argc, char* argv[])
{ {
invoker_ptr->Run(argument_ptr.get(), StreamConfig{nullptr, false}); invoker_ptr->Run(argument_ptr.get(), StreamConfig{nullptr, false});
} }
else
{
throw std::runtime_error(
"Generic instance should be suitable for various input lengths/strides");
}
std::cout << "Done" << std::endl; std::cout << "Done" << std::endl;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <iomanip> #include <iomanip>
#include <vector> #include <vector>
#include <iostream> #include <iostream>
#include <stdexcept>
#include "ck/ck.hpp" #include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp" #include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
...@@ -156,6 +157,11 @@ int main(int argc, char* argv[]) ...@@ -156,6 +157,11 @@ int main(int argc, char* argv[])
{ {
invoker_ptr->Run(argument_ptr.get(), StreamConfig{nullptr, false}); invoker_ptr->Run(argument_ptr.get(), StreamConfig{nullptr, false});
} }
else
{
throw std::runtime_error(
"Generic instance should be suitable for various input lengths/strides");
}
std::cout << "Done" << std::endl; std::cout << "Done" << std::endl;
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#include <iomanip> #include <iomanip>
#include <vector> #include <vector>
#include <iostream> #include <iostream>
#include <stdexcept>
#include "ck/ck.hpp" #include "ck/ck.hpp"
#include "ck/tensor_operation/gpu/device/tensor_layout.hpp" #include "ck/tensor_operation/gpu/device/tensor_layout.hpp"
...@@ -149,6 +150,11 @@ int main(int argc, char* argv[]) ...@@ -149,6 +150,11 @@ int main(int argc, char* argv[])
{ {
invoker_ptr->Run(argument_ptr.get(), StreamConfig{nullptr, false}); invoker_ptr->Run(argument_ptr.get(), StreamConfig{nullptr, false});
} }
else
{
throw std::runtime_error(
"Generic instance should be suitable for various input lengths/strides");
}
std::cout << "Done" << std::endl; std::cout << "Done" << std::endl;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment