mirror of
https://github.com/sgjzfzzf/triton-tvm-ffi.git
synced 2026-07-01 08:51:56 +08:00
1a01c9f2d8
Signed-off-by: Jinjie Liu <jjliu@baai.ac.cn>
41 lines
804 B
C++
41 lines
804 B
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 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
|