Files
triton-tvm-ffi/include/exception.h
T
2026-01-30 01:38:58 +08:00

50 lines
1.0 KiB
C++

#ifndef TRITON_TVM_FFI_EXCEPTION_H_
#define TRITON_TVM_FFI_EXCEPTION_H_
#include "type.h"
#include <cuda.h>
#include <exception>
namespace triton_tvm_ffi {
class CUDAException : public std::exception {
public:
CUDAException(CUresult code);
const char *what() const noexcept override;
private:
const CUresult code_;
};
class NotImplementedException : public std::exception {
public:
NotImplementedException(std::string_view name);
const char *what() const noexcept override;
private:
const std::string message_;
};
class UnmatchedArgumentException : public std::exception {
public:
UnmatchedArgumentException(std::string_view name, size_t len, size_t expect);
const char *what() const noexcept override;
private:
const std::string message_;
};
class UnknownTypeException : public std::exception {
public:
UnknownTypeException(Type type);
UnknownTypeException(std::string_view type);
const char *what() const noexcept override;
private:
const std::string message_;
};
} // namespace triton_tvm_ffi
#endif