Back to home page

EIC code displayed by LXR

 
 

    


Warning, /eic-opticks/ana/rainbow_cfg4_notes.rst is written in an unsupported language. File is not indexed.

0001 rainbow_cfg4.py performance notes
0002 =====================================
0003 
0004 Seconds for rainbow 1M 
0005 -----------------------
0006 
0007 CAVEAT: using laptop GPU with only 384 cores, desktop GPUs expected x20-30 faster
0008 
0009 Disabling step-by-step recording has large improvement
0010 factor for Opticks of about x3 but not much impact on cfg4-.
0011 The result match between G4 and Op remains unchanged.
0012 
0013 
0014 
0015 Seems like reducing the number and size of 
0016 buffers in context is a big win for Opticks.
0017 
0018 With step by step and sequence recording::
0019 
0020    Op   4.6    5.8      # Opticks timings rather fickle to slight code changes, maybe stack 
0021    G4   56.8  55.9
0022 
0023 Just final photon recording:: 
0024 
0025    Op    1.8 
0026    G4   47.9
0027 
0028 
0029 
0030 CAVEAT: above Op is Op/INTEROP
0031 --------------------------------
0032 
0033 Actually this behavior is for Opticks INTEROP mode using OpenGL
0034 buffers, in compute mode with OptiX buffers there is almost no
0035 difference between enabling step-by-step recording and not. 
0036 It seems like OpenGL constrains performance once
0037 total buffer size gets too big.
0038 
0039 
0040 
0041 Matching curand buffer to requirement
0042 ---------------------------------------
0043 
0044 * tried using 1M cuRAND buffer matching the requirement rather than using default 3M all the time,
0045   saw no change in propagation time 
0046 
0047 ::
0048 
0049     # change ggeoview-rng-max value down to 1M
0050 
0051     ggeoview-rng-prep  # create the states cache 
0052  
0053     #  opticks-/OpticksCfg.hh accordingly 
0054 
0055 
0056 Compute Mode, ie no OpenGL
0057 -----------------------------
0058 
0059 Revived "--compute" mode of ggv binary which uses OptiX owned buffers
0060 as opposed to the usual interop approach of using OpenGL buffers.
0061 Both with and without step recording is giving similar times in 
0062 compute mode. This is very different from interop mode where 
0063 cutting down on buffers gives big wins.
0064 
0065 ::
0066 
0067     Op   0.75  0.65 
0068     G4   57.   56.
0069 
0070 A related cmp mode controlled by "--cmp" option uses different computeTest binary, 
0071 is not operational and little motivation now that "--compute" mode works.
0072 Could create package without OpenGL dependencies if there is a need.
0073 
0074 ::
0075 
0076    ggv-;ggv-rainbow --compute 
0077    ggv-;ggv-rainbow --compute --nostep 
0078    ggv-;ggv-rainbow --compute --nostep --dbg
0079 
0080 
0081 * look at how time scales with photon count  
0082 
0083 
0084 Split the prelaunch from launch timings
0085 -----------------------------------------
0086 
0087 Kernel validation, compilation and prelaunch does not 
0088 need to be done for each event so can exclude it from 
0089 timings. 
0090 
0091 Doing this get::
0092 
0093     Op (interop mode)         1.509 
0094     Op (--compute)            0.290
0095     Op (--compute --nostep)   0.294     # skipping step recording not advantageous   
0096     Op (--compute)            0.1416    # hmm some performance instability
0097 
0098 In ">console" login mode "ggv-rainbow" gives error that no GPU available
0099 
0100 Immediately after login getting::
0101 
0102     Op (--compute)            0.148
0103 
0104 
0105 Testing in Console Mode
0106 -------------------------
0107 
0108 ::
0109 
0110     /usr/local/env/opticks/rainbow/mdtorch/5/20160102_170136/t_delta.ini:propagate=0.14798854396212846
0111 
0112     /usr/local/env/opticks/rainbow/mdtorch/5/20160102_171121/t_delta.ini:propagate=0.44531063502654433  # try >console mode 
0113     /usr/local/env/opticks/rainbow/mdtorch/5/20160102_171142/t_delta.ini:propagate=0.45501201006118208
0114     /usr/local/env/opticks/rainbow/mdtorch/5/20160102_171156/t_delta.ini:propagate=0.33855076995678246 
0115     /usr/local/env/opticks/rainbow/mdtorch/5/20160102_171213/t_delta.ini:propagate=0.46851423906628042
0116     /usr/local/env/opticks/rainbow/mdtorch/5/20160102_171226/t_delta.ini:propagate=0.33861030195839703
0117 
0118     /usr/local/env/opticks/rainbow/mdtorch/5/20160102_171527/t_delta.ini:propagate=1.5933509200112894   # GUI interop mode
0119     /usr/local/env/opticks/rainbow/mdtorch/5/20160102_171548/t_delta.ini:propagate=0.27229616406839341  # GUI --compute mode
0120 
0121 Immediately after switching back to automatic graphics switching, then shortly after that::
0122 
0123     0.142      
0124     0.293
0125 
0126 
0127 
0128 To do the nostep check
0129 ------------------------
0130 
0131 After standard comparison::
0132 
0133    ggv-;ggv-rainbow 
0134    ggv-;ggv-rainbow --cfg4 
0135 
0136 * recompile optixrap- without RECORD define 
0137 * run with --nostep option::
0138 
0139    ggv-;ggv-rainbow --nostep 
0140    ggv-;ggv-rainbow --cfg4 --nostep 
0141 
0142 
0143 
0144