Exception: Ignis::NVRTCError
- Defined in:
- lib/nvruby/errors.rb
Overview
Raised when NVRTC compilation fails
Constant Summary collapse
- STATUSES =
{ 0 => :success, 1 => :out_of_memory, 2 => :program_creation_failure, 3 => :invalid_input, 4 => :invalid_program, 5 => :invalid_option, 6 => :compilation_error, 7 => :builtin_operation_failure, 8 => :no_name_expressions_after_compilation, 9 => :no_lowered_names_before_compilation, 10 => :name_expression_not_valid, 11 => :internal_error }.freeze
Instance Attribute Summary collapse
-
#compilation_log ⇒ String?
readonly
Compilation log with error details.
-
#context ⇒ String?
readonly
Context where error occurred.
Attributes inherited from CudaError
Instance Method Summary collapse
-
#initialize(status, compilation_log: nil, context: nil) ⇒ NVRTCError
constructor
A new instance of NVRTCError.
Constructor Details
#initialize(status, compilation_log: nil, context: nil) ⇒ NVRTCError
Returns a new instance of NVRTCError.
249 250 251 252 253 254 255 256 257 258 259 |
# File 'lib/nvruby/errors.rb', line 249 def initialize(status, compilation_log: nil, context: nil) @compilation_log = compilation_log @context = context status_name = STATUSES[status] || :unknown = "NVRTC error: #{status_name}" = "#{context}: #{}" if context = "#{}\nCompilation log:\n#{compilation_log}" if compilation_log && !compilation_log.empty? super(, cuda_code: status) end |
Instance Attribute Details
#compilation_log ⇒ String? (readonly)
Returns Compilation log with error details.
241 242 243 |
# File 'lib/nvruby/errors.rb', line 241 def compilation_log @compilation_log end |
#context ⇒ String? (readonly)
Returns Context where error occurred.
244 245 246 |
# File 'lib/nvruby/errors.rb', line 244 def context @context end |