Skip to content

Commit

Permalink
drop software versions
Browse files Browse the repository at this point in the history
  • Loading branch information
a0s committed Mar 3, 2021
1 parent aab88e3 commit 1ef7cad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 13 deletions.
13 changes: 4 additions & 9 deletions app/n_vidia_smi_xml.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,11 @@ def parse(str)
doc = Nokogiri::XML(str)
output = {}

if (nodes = doc.xpath('/nvidia_smi_log/driver_version/text()')).size == 1
output['driver_version'] = { {} => nodes[0].content.strip }
end

if (nodes = doc.xpath('/nvidia_smi_log/cuda_version/text()')).size == 1
output['cuda_version'] = { {} => nodes[0].content.strip }
end

if (nodes = doc.xpath('/nvidia_smi_log/attached_gpus/text()')).size == 1
output['attached_gpus'] = { {} => nodes[0].content.strip }
path, data = 'attached_gpus', nodes[0].content.strip
if (path, data = normalize_data(path, data))
output[path] = { {} => data }
end
end

# traverse every node in every gpu branch
Expand Down
4 changes: 0 additions & 4 deletions spec/n_vidia_smi_xml_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
context 'nvidia-smi-3.xml' do
let(:result) do
<<~EOS
rspec_driver_version 460.27.04
rspec_cuda_version 11.2
rspec_attached_gpus 2
rspec_display_mode{uuid="683c6e09-3969-31a5-b7ca-cc88252b7fce"} 1
rspec_display_mode{uuid="90e3dab0-b59d-8bf6-d909-d4fab8d2f29b"} 0
Expand Down Expand Up @@ -153,8 +151,6 @@
context 'nvidia-smi-4.xml' do
let(:result) do
<<~EOS
rspec_driver_version 418.56
rspec_cuda_version 10.1
rspec_attached_gpus 1
rspec_display_mode{uuid="1ffe36ef-ac55-60ad-f9cf-623871e7736d"} 0
rspec_display_active{uuid="1ffe36ef-ac55-60ad-f9cf-623871e7736d"} 0
Expand Down

0 comments on commit 1ef7cad

Please sign in to comment.