Llama-3.1-8B-DALv0.1
/
venv
/lib
/python3.12
/site-packages
/torch
/include
/c10
/cuda
/CUDAException.h
// Note [CHECK macro] | |
// ~~~~~~~~~~~~~~~~~~ | |
// This is a macro so that AT_ERROR can get accurate __LINE__ | |
// and __FILE__ information. We could split this into a short | |
// macro and a function implementation if we pass along __LINE__ | |
// and __FILE__, but no one has found this worth doing. | |
// Used to denote errors from CUDA framework. | |
// This needs to be declared here instead util/Exception.h for proper conversion | |
// during hipify. | |
namespace c10 { | |
class C10_CUDA_API CUDAError : public c10::Error { | |
using Error::Error; | |
}; | |
} // namespace c10 | |
// Indicates that a CUDA error is handled in a non-standard way | |
// Intentionally ignore a CUDA error | |
// Clear the last CUDA error | |
// This should be used directly after every kernel launch to ensure | |
// the launch happened correctly and provide an early, close-to-source | |
// diagnostic if it didn't. | |
/// Launches a CUDA kernel appending to it all the information need to handle | |
/// device-side assertion failures. Checks that the launch was successful. | |
namespace c10::cuda { | |
/// In the event of a CUDA failure, formats a nice error message about that | |
/// failure and also checks for device-side assertion failures | |
C10_CUDA_API void c10_cuda_check_implementation( | |
const int32_t err, | |
const char* filename, | |
const char* function_name, | |
const int line_number, | |
const bool include_device_assertions); | |
} // namespace c10::cuda | |