Exception: Ignis::CudaDriverError
- Defined in:
- lib/nvruby/errors.rb
Overview
Raised when CUDA Driver API operation fails
Constant Summary collapse
- STATUSES =
{ 0 => :success, 1 => :invalid_value, 2 => :out_of_memory, 3 => :not_initialized, 4 => :deinitialized, 100 => :no_device, 101 => :invalid_device, 200 => :invalid_image, 201 => :invalid_context, 209 => :no_binary_for_gpu, 218 => :invalid_ptx, 300 => :invalid_source, 301 => :file_not_found, 400 => :invalid_handle, 500 => :not_found, 600 => :not_ready, 700 => :illegal_address, 701 => :launch_out_of_resources, 702 => :launch_timeout, 719 => :launch_failed, 999 => :unknown }.freeze
Instance Attribute Summary collapse
-
#context ⇒ String?
readonly
Context where error occurred.
Attributes inherited from CudaError
Instance Method Summary collapse
-
#initialize(status, context: nil) ⇒ CudaDriverError
constructor
A new instance of CudaDriverError.
Constructor Details
#initialize(status, context: nil) ⇒ CudaDriverError
Returns a new instance of CudaDriverError.
293 294 295 296 297 298 299 300 301 |
# File 'lib/nvruby/errors.rb', line 293 def initialize(status, context: nil) @context = context status_name = STATUSES[status] || :unknown = "CUDA Driver error: #{status_name}" = "#{context}: #{}" if context super(, cuda_code: status) end |
Instance Attribute Details
#context ⇒ String? (readonly)
Returns Context where error occurred.
289 290 291 |
# File 'lib/nvruby/errors.rb', line 289 def context @context end |