お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

フォーラム(掲示板)ルール
フォーラム(掲示板)ルールはこちら  ※コードを貼り付ける場合は [code][/code] で囲って下さい。詳しくはこちら
祈り

お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#1

投稿記事 by 祈り » 7年前

NVIDIA GPUご存じの方いらっしゃらないでしょうか。
お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら、どうなるのでしょうか。

deep learning時代とか、そのためにGPUの時代とか言われながら、GPU掲示板皆無。。。。

まあ CUDA Cも一応C言語であるので、もしかして

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#2

投稿記事 by Math » 7年前

GPU1個で昔のスーパーコンピュータの性能があるんだからすごいよね。
http://csi.nisinippon.com/g8.png
Windows10にCUDA C(VS2015用)がインストールできたけどC-Drive を圧迫するからアンインストールします!
Windows10はGPUの機能を最大限に生かせるDirectX12をOSに採用しているからそのような低レベルのプログラムは必要がないですね。
VC++/CXhttps://msdn.microsoft.com/ja-jp/library/hh699871.aspxで十分ですよ。

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#3

投稿記事 by Math » 7年前

>お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら、どうなるのでしょうか。
たくさんのkernelスレッドが動いてますよ!



みえ
記事: 23
登録日時: 7年前

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#6

投稿記事 by みえ » 7年前

シンプルながら興味深い質問ですね。私も勉強がてら少し検索してみたのですが、どうやら並列実行はされず、シリアライズされるみたいです。ただし、MPS というものを使うと実現できそうです。(MPS は Linux のみのサポートのようですが。)
以下のフォーラムを参考にしましたが、もしかすると最新のアーキテクチャではまた話が違うかもしれません。
試してみればすぐに分かりそうなのですが、試せる環境が手元にないため全て伝聞調で申し訳ないです。。

Concurrent execution of more than one CUDA application - NVIDIA Developer Forums
https://devtalk.nvidia.com/default/topi ... nt=2861843
No, it is not possible. Each kernel utilizes the entire GPU
Threaded CUDA Multiple concurrent kernels? - NVIDIA Developer Forums
https://devtalk.nvidia.com/default/topi ... nt=2872663
If you want to have multiple host threads (or processes) access the same GPU, that will also work, but there is an efficiency cost. Each kernel "owns" all the multiprocessors on the GPU while it is running until it completes.
cuda - Do I have to use the MPS (MULTI-PROCESS SERVICE) when using CUDA6.5 + MPI? - Stack Overflow
http://stackoverflow.com/questions/2570 ... uda6-5-mpi
If you don't use MPS, but you launch multiple MPI ranks per node (i.e. per GPU), then if you have the compute mode set to default, then your GPU activity will serialize.
gpu - Multiple processes launching CUDA kernels in parallel - Stack Overflow
http://stackoverflow.com/questions/1489 ... n-parallel
So to answer your first question, if you have seven separate threads or processes all trying to establish a context and run on the same GPU simultaneously, they will be serialised and any process waiting for access to the GPU will be blocked until the owner of the running context yields.

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#7

投稿記事 by Math » 7年前

もう3GBくらいは使っても余裕で動きそうなので”少しどんなものなのか”調べてみようと思います.[雑談]

画像

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#8

投稿記事 by Math » 7年前

[CUDA(Compute Unified Device Architecture:クーダ)ver8.0について]
NVIDIAが提供するGPU向けのC言語の統合開発環境であり、コンパイラ (nvcc)やライブラリなどから構成されている。
https://ja.wikipedia.org/wiki/CUDA#.E3. ... 3.E3.83.88
[VS2015に入っているサンプル]
画像
画像
画像
[コンパイラ (nvcc)]

コード:

Usage  : nvcc [options] <inputfile>

Options for specifying the compilation phase
============================================
More exactly, this option specifies up to which stage the input files must be compiled,
according to the following compilation trajectories for different input file types:
        .c/.cc/.cpp/.cxx : preprocess, compile, link
        .o               : link
        .i/.ii           : compile, link
        .cu              : preprocess, cuda frontend, PTX assemble,
                           merge with host C code, compile, link
        .gpu             : cicc compile into cubin
        .ptx             : PTX assemble into cubin.

--cuda  (-cuda)                           
        Compile all .cu input files to .cu.cpp.ii output.

--cubin (-cubin)                          
        Compile all .cu/.gpu/.ptx input files to device-only .cubin files.  This
        step discards the host code for each .cu input file.

--fatbin(-fatbin)                         
        Compile all .cu/.gpu/.ptx/.cubin input files to device-only .fatbin files.
        This step discards the host code for each .cu input file.

--ptx   (-ptx)                            
        Compile all .cu/.gpu input files to device-only .ptx files.  This step discards
        the host code for each of these input file.

--gpu   (-gpu)                            
        Compile all .cu input files to device-only .gpu files.  This step discards
        the host code for each .cu input file.

--preprocess                               (-E)                              
        Preprocess all .c/.cc/.cpp/.cxx/.cu input files.

--generate-dependencies                    (-M)                              
        Generate a dependency file that can be included in a make file for the .c/.cc/.cpp/.cxx/.cu
        input file (more than one are not allowed in this mode).

--compile                                  (-c)                              
        Compile each .c/.cc/.cpp/.cxx/.cu input file into an object file.

--device-c                                 (-dc)                             
        Compile each .c/.cc/.cpp/.cxx/.cu input file into an object file that contains
        relocatable device code.  It is equivalent to '--relocatable-device-code=true
        --compile'.

--device-w                                 (-dw)                             
        Compile each .c/.cc/.cpp/.cxx/.cu input file into an object file that contains
        executable device code.  It is equivalent to '--relocatable-device-code=false
        --compile'.

--device-link                              (-dlink)                          
        Link object files with relocatable device code and .ptx/.cubin/.fatbin files
        into an object file with executable device code, which can be passed to the
        host linker.

--link  (-link)                           
        This option specifies the default behavior: compile and link all inputs.

--lib   (-lib)                            
        Compile all inputs into object files (if necessary) and add the results to
        the specified output library file.

--run   (-run)                            
        This option compiles and links all inputs into an executable, and executes
        it.  Or, when the input is a single executable, it is executed without any
        compilation or linking. This step is intended for developers who do not want
        to be bothered with setting the necessary environment variables; these are
        set temporarily by nvcc).


File and path specifications.
=============================

--output-file <file>                       (-o)                              
        Specify name and location of the output file.  Only a single input file is
        allowed when this option is present in nvcc non-linking/archiving mode.

...............


--help  (-h)                              
        Print this help information on this tool.

--version                                  (-V)                              
        Print version information on this tool.

--options-file <file>,...                  (-optf)                           
        Include command line options from specified file.
[/size]

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#9

投稿記事 by Math » 7年前

[DirectX 10世代/プログラマブルシェーダ4.0仕様対応(SM4.0:Shader Model4.0)のGPUでのキーテクノロジーとは]
http://news.mynavi.jp/special/2007/r600/006.html
[CPU並のプログラマビリティを身につけたDirect X10世代プログラマブルシェーダ4.0仕様(SM4.0:Shader Model4.0)対応GPU
の活躍の場を広げる意味合いから、NVIDIAはGPUにグラフィックス以外の汎用アプリケーションを走らせる
[CUDA」構想を発表した。]
http://news.mynavi.jp/articles/2006/12/19/cuda/
[CUDA 並列コンピューティング !]
http://www.nvidia.co.jp/object/cuda-par ... rm-jp.html

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#10

投稿記事 by Math » 7年前

今は"xaml"を使えば簡単にDirectXの機能を使える。
http://csi.nisinippon.com/nv32.png

コード:

Add-Type -AssemblyName PresentationFramework
$xaml = @'
<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Rectangle" Height="300" Width="300">
    <Grid ShowGridLines="True" Opacity="1">
        <Grid.RowDefinitions>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
            <RowDefinition/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Rectangle Grid.Row="0" Grid.ColumnSpan="2" Stroke="#FF001900" Fill="#7A0000FF"/>
        
        <Rectangle Grid.Column="1" Grid.ColumnSpan="2" Grid.RowSpan="3"  
        Name="Rectangle1" Stroke="Black" Fill="#FFFB0000" Opacity="0.5" StrokeThickness="5" />
        <Grid Grid.Column="2" Grid.Row="3" Background="DarkGoldenrod" Opacity="0.5"/>
    </Grid>
</Window>
'@

$x = [System.Windows.Markup.XamlReader]::Parse($xaml)
$x.ShowDialog()
[/size]

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#11

投稿記事 by Math » 7年前

[楕円形のボタン]
画像

コード:

 $xaml = @'
<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Width="300" Height="200">

<StackPanel Width="180">
  <Button>
  <Button.Template>
    <ControlTemplate TargetType="Button">
      <Ellipse Fill="LightGreen" Width="80" Height="30"/>
    </ControlTemplate>
  </Button.Template>
</Button>

</StackPanel>

</Window>
'@

$x = [System.Windows.Markup.XamlReader]::Parse($xaml)
$x.ShowDialog()
[/size]

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#12

投稿記事 by Math » 7年前

[WPF]プログラム
http://csi.nisinippon.com/nv32c.png

コード:

#Add-Type -AssemblyName PresentationFramework
$xaml = @'
<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="MainWindow" Height="300" Width="300">
    <StackPanel>
               <Button Name="B" Content="Button: Hell World!"  Margin="5"/>
               <Label   Name="La" Content="Label: Hell World!"  
                  Margin="5" HorizontalAlignment="Left"/>
               <TextBox 
               
               Name="T" Text="TextBox: Hell World!" Margin="5"/>
               <ListBox Name="Li" Height="60" Margin="5"  /> 
    </StackPanel>
</Window>
'@
$xw = [System.Windows.Markup.XamlReader]::Parse($xaml)
$xw.Background = "#CCCCFF"
$B=$xw.FindName("B")
$B.ToString()
$B.Margin
$B.add
$B_clicked = $B.add_Click
$B_clicked.Invoke({ 
            $La.Content = $T.Text
            Write-Host $La.Content
        })
$La=$xw.FindName("La")
$La.ToString()
$T=$xw.FindName("T")
$T.ToString()

$Li=$xw.FindName("Li")
$Li.ToString()

$Li_MouseDown = $Li.add_MouseDown

  
$Li_MouseDown.Invoke({ 
            $La.Content = $T.Text
             Write-Host $La.Content
        })
$Li.Items.Add("AAA")
$Li.Items.Add("BBB")
$Li.Items.Add("CCC")
$xw.ShowDialog()
exit
[/size]

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#13

投稿記事 by Math » 7年前

[ベジェ曲線]
画像

コード:

Add-Type -AssemblyName PresentationFramework
[xml]$xaml = @'
<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="MainWindow" Height="300" Width="300">
 <Canvas Name="cvs" Height ="300" Width ="300">
  <Path Stroke="Black" StrokeThickness="2">
  <Path.Data>
    <PathGeometry>
      <PathGeometry.Figures>
        <PathFigureCollection>
          <PathFigure StartPoint="10,100">
            <PathFigure.Segments>
              <PathSegmentCollection>
                <QuadraticBezierSegment Point1="150,200" Point2="290,100" />
              </PathSegmentCollection>
            </PathFigure.Segments>
          </PathFigure>
        </PathFigureCollection>
      </PathGeometry.Figures>
    </PathGeometry>
  </Path.Data>
</Path>
 </Canvas>
</Window>
'@
$r= New-Object System.Xml.XmlNodeReader($xaml)
$x=[Windows.Markup.XamlReader]::Load( $r )
$x.ShowDialog()
[/size]

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#14

投稿記事 by Math » 7年前

[WPF で図形を描く:Geometry]
画像

コード:

Add-Type -AssemblyName PresentationFramework
$xaml = @'
<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="MainWindow" Height="300" Width="300">
<Canvas Name="cvs" Height ="300" Width ="300" Background="White"> 
<Rectangle Width="200" Height="200">
  <Rectangle.Fill>
    <VisualBrush TileMode="Tile">
      <VisualBrush.Visual>
        <StackPanel>
          <StackPanel.Background>
            <DrawingBrush>
              <DrawingBrush.Drawing>
                <GeometryDrawing>
                  <GeometryDrawing.Brush>
                    <RadialGradientBrush>
                      <GradientStop Color="Red" Offset="0.0" />
                      <GradientStop Color="White" Offset="1.0" />
                    </RadialGradientBrush>
                  </GeometryDrawing.Brush>
                  <GeometryDrawing.Geometry>
                    <GeometryGroup>
                      <RectangleGeometry Rect="0,0,50,50" />
                      <RectangleGeometry Rect="50,50,50,50" />
                    </GeometryGroup>
                  </GeometryDrawing.Geometry>
                </GeometryDrawing>
              </DrawingBrush.Drawing>
            </DrawingBrush>
          </StackPanel.Background>
          <TextBlock FontSize="22pt" Margin="10">ABC123</TextBlock>
        </StackPanel>
      </VisualBrush.Visual>
    </VisualBrush>
  </Rectangle.Fill>
</Rectangle>

</Canvas>
</Window>
'@
$x = [System.Windows.Markup.XamlReader]::Parse($xaml)
$x.ShowDialog()
[/size]

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#15

投稿記事 by Math » 7年前

[WPF で図形を描く:Geometry]
画像

コード:

Add-Type -AssemblyName PresentationFramework
$xaml = @'
<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="MainWindow" Height="300" Width="300">
<Canvas Name="cvs" Height ="300" Width ="300" Background="White"> 
<Rectangle Width="200" Height="200">
  <Rectangle.Fill>
    <VisualBrush TileMode="Tile">
      <VisualBrush.Visual>
        <StackPanel>
          <StackPanel.Background>
            <DrawingBrush>
              <DrawingBrush.Drawing>
                <GeometryDrawing>
                  <GeometryDrawing.Brush>
                    <RadialGradientBrush>
                      <GradientStop Color="Red" Offset="0.0" />
                      <GradientStop Color="White" Offset="1.0" />
                    </RadialGradientBrush>
                  </GeometryDrawing.Brush>
                  <GeometryDrawing.Geometry>
                    <GeometryGroup>
                      <RectangleGeometry Rect="0,0,50,50" />
                      <RectangleGeometry Rect="50,50,50,50" />
                    </GeometryGroup>
                  </GeometryDrawing.Geometry>
                </GeometryDrawing>
              </DrawingBrush.Drawing>
            </DrawingBrush>
          </StackPanel.Background>
          <TextBlock FontSize="22pt" Margin="10">ABC123</TextBlock>
        </StackPanel>
      </VisualBrush.Visual>
    </VisualBrush>
  </Rectangle.Fill>
</Rectangle>

</Canvas>
</Window>
'@
$x = [System.Windows.Markup.XamlReader]::Parse($xaml)
$x.ShowDialog()
[/size]

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#16

投稿記事 by Math » 7年前

[Gradient]4角形
画像

コード:

Add-Type -AssemblyName PresentationFramework
$xaml = @'
<Window
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    Title="MainWindow" Height="300" Width="300">
<Canvas Name="cvs" Height ="300" Width ="300" Background="White"> 

<Rectangle Width="200" Height="200">
  <Rectangle.Fill>
    <LinearGradientBrush>
      <GradientStop Color="Yellow" Offset="0.0" />
      <GradientStop Color="Orange" Offset="0.5" />
      <GradientStop Color="Red" Offset="1.0" />
    </LinearGradientBrush>
  </Rectangle.Fill>
</Rectangle>

</Canvas>
</Window>
'@
$x = [System.Windows.Markup.XamlReader]::Parse($xaml)
$x.ShowDialog()

[/size]

tajiam

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#17

投稿記事 by tajiam » 7年前

よこからすみません
もし異なるプロセスが同じGPUに各自のカーネル関数を"同時に実行させようとしたら、GPUが同時に実行できないので、それで衝突が発生するはずです。
衝突が発生したら、どうなるのでしょうか?

ランダムに一つカーネルを実行するの?
それとも異常としてどれも受け入れず、エラーになるの?

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#18

投稿記事 by Math » 7年前

フォーラムルールをお読み下さい。http://dixq.net/board/
以下のテンプレをコピペし各項目に対して答える形で記載して下さい。
[1] 質問文
 [1.1] 自分が今行いたい事は何か
 [1.2] どのように取り組んだか(プログラムコードがある場合記載)
 [1.3] どのようなエラーやトラブルで困っているか(エラーメッセージが解る場合は記載)
 [1.4] 今何がわからないのか、知りたいのか

[2] 環境  
 [2.1] OS : Windows, Windows10+ウブンツゥ,Linux,Mac 等々.また開発時と使用時の環境がことなる理由など。
 [2.2] コンパイラ名 : VC++ 2015, Borand C++, gcc,Objective-C,Andoroid用C/C++等々

[3] その他
 ・どの程度C/C++言語を理解しているか。ほか得意分野[C#,VB,Java,jQuery,OpenGL,OpenCV,DirectX,Qt,VBA..]
----何故その様な状況が起きたか具体的にコードを提示下さい。何個並列で使われていますか?

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#19

投稿記事 by Math » 7年前

有限要素法(FEM),NASTRAN,確率偏微分方程式(derivativ)なら少しやったことがあります。CPU(RISC)256個実装したLinux(大型機)も使いました。

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#20

投稿記事 by Math » 7年前

こういうことは https://devtalk.nvidia.com/default/ に聞くこと。(秒進分歩の世界なのにわかる分けないですよね。)(サイトの説明だと"ドライバー”のことを言ってると思われるけど。)

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#21

投稿記事 by Math » 7年前

[Template]
画像

コード:

$xaml = @'
<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Width="300" Height="200">

<StackPanel>
  <StackPanel.Resources>
    <!-- 自動適用スタイル -->
    <Style TargetType="Button">
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Ellipse Fill="LightBlue" Width="80" Height="30"/>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
  </StackPanel.Resources>

  <!-- 以下のボタンには、
       自動的にコントロール・テンプレートが設定される -->
  <Button />
  <Button />
  <Button />
</StackPanel>

</Window>
'@
$x = [System.Windows.Markup.XamlReader]::Parse($xaml)
$x.ShowDialog()
[/size]

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#22

投稿記事 by Math » 7年前

[ContentPresenter]
http://csi.nisinippon.com/nv3d.png

コード:

$xaml = @'
<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Width="300" Height="200">
<StackPanel Width="80">
  <StackPanel.Resources>
    <Style TargetType="Button">
      <Setter Property="Template">
        <Setter.Value>
          <ControlTemplate TargetType="Button">
            <Grid>
              <Ellipse Fill="{TemplateBinding Background}"/>
              <ContentPresenter
                HorizontalAlignment="Center"
                VerticalAlignment="Center"/>
            </Grid>
          </ControlTemplate>
        </Setter.Value>
      </Setter>
    </Style>
  </StackPanel.Resources>
  <Button Content="ボタン1" Background="LightBlue" Height="30" />
  <Button Content="ボタン2" Background="LightPink" Height="30" />
</StackPanel>
</Window>
'@
$x = [System.Windows.Markup.XamlReader]::Parse($xaml)
$x.ShowDialog()
[/size]

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#23

投稿記事 by Math » 7年前

[Style]スタイル
画像

コード:

$xaml = @'
<Window
  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="MainWindow" Width="300" Height="200">
 <StackPanel>
  <StackPanel.Resources>
    <Style TargetType="Button">
      <Setter Property="Background" Value="Red" />
      <Setter Property="Foreground" Value="White" />
    </Style>   
    <Style x:Key="xBtn" TargetType="Button">
      <Setter Property="Background" Value="Blue" />
      <Setter Property="Foreground" Value="White" />
    </Style>
  </StackPanel.Resources> 
  <Button Content="sAuto1" />
   <Button Style="{StaticResource xBtn}" 
          Content="xKeyBtn" />
  <Button Content="sB3">
    <Button.Style>
      <Style TargetType="Button">
        <Setter Property="Background" Value="Yellow" />
      </Style>
    </Button.Style>
  </Button>
</StackPanel>
</Window>
'@
$x = [System.Windows.Markup.XamlReader]::Parse($xaml)
$x.ShowDialog()
[/size]


祈り

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#25

投稿記事 by 祈り » 7年前

沢山レスポンスいただき誠に嬉しいし、大変ありがたいと思います。
やはり時代ですね。
昔GPUに関する質問を出したらほぼ無視されたのです。

みえ様のお返答が私の質問にぴったりでした。
問題の本質をよく理解されて、とても適切な情報をご提供いただいた事に
非常に感謝します。
時代は「英語」の時代でもありますね。

ただ、もし"まったく同じ瞬間" で、
複数のprocessesやthreadsが同時に同じGPUにkernel実行させようとしたら、
どうなるのでしょうか、優先順位もあるのでしょうか。
=====この辺説明できる方はいらっしゃると信じます。

Math

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#26

投稿記事 by Math » 7年前

今のWinndowsOS(WindowsNT ver10.0)はDECの大型コンピューター系のOSであり[WindowsNT系:20年位前(PDP-11を開発した)カトラーによって開発された]
https://ja.wikipedia.org/wiki/%E3%83%87 ... 9%E3%83%BCkernelとはその中枢である。https://ja.wikipedia.org/wiki/%E3%82%AB ... D%E3%83%AB
(そのDECの大型コンピューター系PDP-11はビル・ゲーツが中学生のころ母親のこれからはコンピューター時代だと教育され近くの会社に頼んで空いた時間に”BUGをとってレンタル料を下げる”という約束で使った伝説の機械です。そこでBUGをみつけ何とレンタル料がただになった!。)
(C言語の3項演算子はPDP-11の機械語に由来する)
Linuxは”リーナス・トーバルズ”の開発し今や大型コンピューターからTVまで多数使われるUnixです。
https://ja.wikipedia.org/wiki/%E3%83%AA ... B%E3%82%BA
それらの仕組みではたくさんのプロセスがタスクスケジューラーによって動いており仕組みはそれぞれの特許である。(Unixはカーネルの特許が複雑でトーバルズは特許にかからぬよう一から開発しなおした)
それに並列コンピューティングの話にはそうゆう仕掛けではなく”ドライバー”によって駆動されるのであってプロセスとか呼ぶものとは何のことか不明。
我々のあずかり知らぬ世界でありこういうことは製造元の https://devtalk.nvidia.com/default/ に聞くこと。(秒進分歩の世界なので今日の常識は明日の非常識です。どんな簡単なことでもメーカーに聞くと変わっていることが多い。富士通さんにはリモコンではいってもらってきけるので殆んど毎日電話している。昨日もWindows10でDesktop表示がおかしくなったので見てもらったら”タブレット・モード”になっていた...。

祈り

Re: お互い知らない複数のプロセスが同時に同じGPUにkernelを実行させようとしたら

#27

投稿記事 by 祈り » 7年前

みえ様のお返答は非常に完璧でした。
皆様有難うございました。

返信

“C言語何でも質問掲示板” へ戻る