azonenberg changed the topic of #scopehal to: libscopehal, libscopeprotocols, and glscopeclient development and testing | https://github.com/glscopeclient/scopehal-apps | Logs: https://libera.irclog.whitequark.org/scopehal
<azonenberg> And then i have to work on pipeline caching
<azonenberg> as we're now burning a lot of time reloading stuff
<_whitenotifier-7> [scopehal] azonenberg opened issue #676: VulkanFFTPlan: caching of plans - https://github.com/glscopeclient/scopehal/issues/676
<_whitenotifier-7> [scopehal] azonenberg labeled issue #676: VulkanFFTPlan: caching of plans - https://github.com/glscopeclient/scopehal/issues/676
<_whitenotifier-7> [scopehal] azonenberg labeled issue #677: ComputePipeline: caching of pipelines - https://github.com/glscopeclient/scopehal/issues/677
<_whitenotifier-7> [scopehal] azonenberg opened issue #677: ComputePipeline: caching of pipelines - https://github.com/glscopeclient/scopehal/issues/677
<_whitenotifier-7> [scopehal] azonenberg opened issue #678: ComputePipeline: lazy initialization - https://github.com/glscopeclient/scopehal/issues/678
<_whitenotifier-7> [scopehal] azonenberg labeled issue #678: ComputePipeline: lazy initialization - https://github.com/glscopeclient/scopehal/issues/678
<_whitenotifier-7> [scopehal] azonenberg labeled issue #679: Fix bug where some VkBuffer is not destroyed by the time we're shutting down - https://github.com/glscopeclient/scopehal/issues/679
<_whitenotifier-7> [scopehal] azonenberg opened issue #679: Fix bug where some VkBuffer is not destroyed by the time we're shutting down - https://github.com/glscopeclient/scopehal/issues/679
<_whitenotifier-7> [scopehal] azonenberg opened issue #680: Start using Vulkan debug extensions to name objects (at least in debug builds) - https://github.com/glscopeclient/scopehal/issues/680
Degi has quit [Ping timeout: 252 seconds]
Degi has joined #scopehal
<_whitenotifier-7> [scopehal] azonenberg pushed 3 commits to master [+2/-1/±15] https://github.com/glscopeclient/scopehal/compare/02dd69218fa1...77d6f4639d13
<_whitenotifier-7> [scopehal] azonenberg 307794d - Initial vkFFT integration
<_whitenotifier-7> [scopehal] azonenberg 4266649 - Removed OpenCL window functions that are no longer being used
<_whitenotifier-7> [scopehal] azonenberg 77d6f46 - FFTFilter: now use full Vulkan based pipeline. clFFT no longer used, FFTS kept as fallback for testing
<_whitenotifier-7> [scopehal-apps] azonenberg pushed 1 commit to master [+0/-0/±2] https://github.com/glscopeclient/scopehal-apps/compare/759b7b81d86a...8edb7d18722b
<_whitenotifier-7> [scopehal-apps] azonenberg 8edb7d1 - Updated test case for FFT
<azonenberg> woot. peak detection still needs to be GPU-ified but the whole rest of the FFT filter is now running in Vulkan
<azonenberg> and it's performing quite nicely
HexaCube has quit [*.net *.split]
asy_ has quit [*.net *.split]
Stephie has quit [*.net *.split]
benishor has quit [*.net *.split]
azonenberg has quit [*.net *.split]
Yamakaja has quit [*.net *.split]
monochroma has quit [*.net *.split]
Bird|otherbox has quit [*.net *.split]
miek has quit [*.net *.split]
JSharp has quit [*.net *.split]
whitequark has quit [*.net *.split]
jevinskie[m] has quit [*.net *.split]
lethalbit has quit [*.net *.split]
gruetzkopf has quit [*.net *.split]
ericonr has quit [*.net *.split]
sorear has quit [*.net *.split]
Degi has quit [*.net *.split]
d1b2 has quit [*.net *.split]
lain has quit [*.net *.split]
josuah has quit [*.net *.split]
octorian has quit [*.net *.split]
balrog has quit [*.net *.split]
darthrake has quit [*.net *.split]
agg has quit [*.net *.split]
Stary has quit [*.net *.split]
sajattack[m] has quit [*.net *.split]
mikolajw has quit [*.net *.split]
elms has quit [*.net *.split]
welterde has quit [*.net *.split]
kbeckmann has quit [*.net *.split]
florolf has quit [*.net *.split]
mxshift has quit [*.net *.split]
Fridtjof has quit [*.net *.split]
esden has quit [*.net *.split]
tnt has quit [*.net *.split]
vup has quit [*.net *.split]
_florent_ has quit [*.net *.split]
d1b2 has joined #scopehal
mxshift has joined #scopehal
_florent_ has joined #scopehal
florolf has joined #scopehal
agg has joined #scopehal
vup has joined #scopehal
kbeckmann has joined #scopehal
tnt has joined #scopehal
benishor has joined #scopehal
Yamakaja has joined #scopehal
Bird|otherbox has joined #scopehal
esden has joined #scopehal
darthrake has joined #scopehal
Stephie has joined #scopehal
asy_ has joined #scopehal
balrog has joined #scopehal
sorear has joined #scopehal
ericonr has joined #scopehal
gruetzkopf has joined #scopehal
elms has joined #scopehal
welterde has joined #scopehal
azonenberg has joined #scopehal
monochroma has joined #scopehal
lethalbit has joined #scopehal
josuah has joined #scopehal
miek has joined #scopehal
HexaCube has joined #scopehal
Stary has joined #scopehal
Fridtjof has joined #scopehal
Degi has joined #scopehal
whitequark has joined #scopehal
jevinskie[m] has joined #scopehal
octorian has joined #scopehal
mikolajw has joined #scopehal
lain has joined #scopehal
JSharp has joined #scopehal
sajattack[m] has joined #scopehal
<_whitenotifier-7> [scopehal] azonenberg a5c18ac - Fixed bug causing multiple threads to actually use a single hardware Vulkan queue
<_whitenotifier-7> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±4] https://github.com/glscopeclient/scopehal/compare/77d6f4639d13...a5c18ac6970b
HexaCube has quit [*.net *.split]
asy_ has quit [*.net *.split]
Stephie has quit [*.net *.split]
asy_ has joined #scopehal
Stephie has joined #scopehal
HexaCube has joined #scopehal
benishor has quit [*.net *.split]
azonenberg has quit [*.net *.split]
Yamakaja has quit [*.net *.split]
monochroma has quit [*.net *.split]
Bird|otherbox has quit [*.net *.split]
miek has quit [*.net *.split]
JSharp has quit [*.net *.split]
jevinskie[m] has quit [*.net *.split]
whitequark has quit [*.net *.split]
lethalbit has quit [*.net *.split]
gruetzkopf has quit [*.net *.split]
ericonr has quit [*.net *.split]
sorear has quit [*.net *.split]
octorian has quit [*.net *.split]
balrog has quit [*.net *.split]
darthrake has quit [*.net *.split]
agg has quit [*.net *.split]
Stary has quit [*.net *.split]
sajattack[m] has quit [*.net *.split]
mikolajw has quit [*.net *.split]
welterde has quit [*.net *.split]
elms has quit [*.net *.split]
kbeckmann has quit [*.net *.split]
florolf has quit [*.net *.split]
mxshift has quit [*.net *.split]
Stary has joined #scopehal
sajattack[m] has joined #scopehal
elms has joined #scopehal
kbeckmann has joined #scopehal
mikolajw has joined #scopehal
welterde has joined #scopehal
florolf has joined #scopehal
mxshift has joined #scopehal
Fridtjof has quit [*.net *.split]
esden has quit [*.net *.split]
tnt has quit [*.net *.split]
vup has quit [*.net *.split]
_florent_ has quit [*.net *.split]
Fridtjof has joined #scopehal
tnt has joined #scopehal
vup has joined #scopehal
_florent_ has joined #scopehal
esden has joined #scopehal
Bird|otherbox has joined #scopehal
Yamakaja has joined #scopehal
monochroma has joined #scopehal
azonenberg has joined #scopehal
benishor has joined #scopehal
gruetzkopf has joined #scopehal
JSharp has joined #scopehal
lethalbit has joined #scopehal
sorear has joined #scopehal
ericonr has joined #scopehal
miek has joined #scopehal
sajattack[m] has quit [Ping timeout: 240 seconds]
Degi has quit [*.net *.split]
d1b2 has quit [*.net *.split]
lain has quit [*.net *.split]
josuah has quit [*.net *.split]
octorian has joined #scopehal
balrog has joined #scopehal
darthrake has joined #scopehal
agg has joined #scopehal
balrog has quit [Max SendQ exceeded]
d1b2 has joined #scopehal
lain has joined #scopehal
Degi has joined #scopehal
josuah has joined #scopehal
d1b24 has joined #scopehal
d1b2 has quit [Remote host closed the connection]
d1b24 is now known as d1b2
balrog has joined #scopehal
mikolajw has quit [Ping timeout: 264 seconds]
<azonenberg> lain: update on my end
<azonenberg> i merged your arm64 work from the other day as well as initial vkFFT integration
<azonenberg> as of now, only the FFT (and jitter spectrum, which is a subclass of FFT) filter uses vkFFT. We still use clFFT in the de-embed and channel emulation filters
<azonenberg> and FFTS is still a dependency, but is only actually used in the new code if you do --nogpufilter or are running unit tests
<azonenberg> in the near term I plan to remove clFFT, but keep FFTS so i have a reference implementation to compare vkFFT against in unit tests
whitequark has joined #scopehal
<_whitenotifier-7> [scopehal] azonenberg pushed 1 commit to master [+0/-0/±1] https://github.com/glscopeclient/scopehal/compare/a5c18ac6970b...c7487589343d
<_whitenotifier-7> [scopehal] azonenberg c748758 - Updated logtools
<_whitenotifier-7> [scopehal-apps] azonenberg pushed 1 commit to master [+0/-0/±2] https://github.com/glscopeclient/scopehal-apps/compare/beaaa64252f3...d861c2fbc191
<_whitenotifier-7> [scopehal-apps] azonenberg d861c2f - Tweaked queue settings to reduce latency
jevinskie[m] has joined #scopehal
<azonenberg> Hmmmm
<azonenberg> So it looks like we are actually losing out on a fair bit of performance thanks to using GtkGLArea
<azonenberg> Because of its insistence on using separate framebuffers etc
<azonenberg> So that's another argument in favor of moving away from it in the future
<azonenberg> tl;dr we actually spend several times more CPU per frame in GTK overhead and such than we do in actual rendering
<azonenberg> in particular we spend almost as much time in glXGetVisualFromFBConfig as we do in WaveformArea::OnRender() for my current test case
<azonenberg> So unless we want to fork GTK, there seems to be a ceiling in how much more performance we can squeeze out - at least with gtk3
<azonenberg> and gtkglarea
<azonenberg> Note that this is primarily a ceiling on FPS for simple filter graphs that are bottlenecked on the O(1) overhead per frame (the more waveformarea's you have, the worse the overhead is)
<azonenberg> in particular you can have arbitrarily complex processing pipelines and rendering and will quickly get bottlenecked on that
<lain> hmm
<azonenberg> Which is suddenly making the imgui route look more attractive long term
<azonenberg> it's still not a 2022 priority, i think
<azonenberg> and i think it would make sense, if we do switch, to do so gradually
<azonenberg> a few dialogs etc at a time will turn into a gtkglarea full of imgui widgets
<azonenberg> and once they're all gone, we can switch the core easily
<azonenberg> lain: anyway, please pull latest code, fix anything you need to wrt libglslang and such so it compiles
<azonenberg> and let me know if "make test" is working on your x86 linux dev box (especially the FFT)
<lain> kk
<azonenberg> also, what is the status of building/testing on the pi4? i know you got it to compile on arm64 VM when you were over
<lain> ah yeah
<lain> I'll plug the pi4 in and resume that on monday
<lain> it *should* work on pi4, at least to the same degree that it works on arm64, but I'll verify it monday
<azonenberg> well in particular i want to know status of the unit tests
<azonenberg> glscopeclient won't run on either the pi or the vm yet (at least, actually let you create a WaveformArea) because of the gl 4.3 dependency
<azonenberg> but the tests should work fine with only vulkan
<lain> ah ok
<lain> I'll plug it in right now and get it building, will check on it periodically :P
<azonenberg> yeah. it shouldnt need much of your time given the compile on the VM
<azonenberg> please pull latest from git as of now
<azonenberg> since it has vkFFT set up
<azonenberg> and use that as your baseline
<azonenberg> (this has your arm fixes merged)
<lain> true, I can compile on my laptop and just copy it over
<lain> azonenberg: lots of narrowing conversion errors in base64.cpp
<lain> which is weird, hrm
<lain> ok yeah it looks like it's not treating char as signed, lemme see what broke
<lain> oh, it helps if I remember to pull the latest code >_<
sajattack[m] has joined #scopehal
mikolajw has joined #scopehal
bvernoux has joined #scopehal
<bvernoux> So I checked on Ubuntu 20.04 LTS
<bvernoux> same error as with MinGw64
<bvernoux> 36 | #include <glslang_c_interface.h>
<bvernoux> | ^~~~~~~~~~~~~~~~~~~~~~~
<bvernoux> with sudo apt-get -y install glslang-dev
<bvernoux> installed
<bvernoux> so the include dir/lib path are missing
<bvernoux> full error
<bvernoux> home/ben/scopehal-apps/lib/scopehal/VulkanInit.cpp:36:10: fatal error: glslang_c_interface.h: No such file or directory
<bvernoux> | ^~~~~~~~~~~~~~~~~~~~~~~
<bvernoux> 36 | #include <glslang_c_interface.h>
<bvernoux> @azonenberg, how are you building so far ?
<bvernoux> Also I'm not sure sudo apt-get -y install glslang-dev is a good idea
<bvernoux> as it shall match with the VulkanSDK
<bvernoux> we are mixing things and it could finish very badly
<bvernoux> For me it seems clear we need a specific scopehal-apps\cmake\Findglslang.cmake to add the correct include dir/lib path
<bvernoux> for all platform Linux/Windows
<bvernoux> Any other idea are welcome like always
<azonenberg> yes we may have to add some custom cmake scripts for that
<azonenberg> good news is, this should be the last major dependency we're adding for some time
<bvernoux> yes
<bvernoux> other interesting point
<bvernoux> Ubuntu-20.04\home\ben\vulkan\1.3.224.1\x86_64\include\glslang\Include
<bvernoux> it include the glslang_c_interface.h
<bvernoux> but on windows it does not
<bvernoux> C:\VulkanSDK\1.3.224.1\Include\glslang\Include
<bvernoux> Maybe I can create an issue
<bvernoux> As I do not understand why on Windows VulkanSDK those includes are missing
<bvernoux> anyway in both case on linux the include path to glslang\Include is not added by default and the build fail like explained before
<bvernoux> I see in scopehal-apps\lib\VkFFT\CMakeLists.txt you fetch the repo https://github.com/KhronosGroup/glslang and add the Include path ...
<bvernoux> target_include_directories(${PROJECT_NAME} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/glslang-master/glslang/Include/)
<bvernoux> ...
<bvernoux> he hacked the glslang stuff like that ...
<azonenberg> note that we are now running a fork of vkFFT, not upstream
<azonenberg> as a temporary fix for a thread safety issue
<azonenberg> which they're aware of but have not yet patched
<bvernoux> ha ok
<bvernoux> ha yes I see it https://github.com/glscopeclient/VkFFT
<bvernoux> Tolmachev Dmitrii has done an amazing job on VkFFT
<azonenberg> that's 52M 2M-point FFTs per second (4 channels * ~13 WFM/s)
<azonenberg> about 1.6 Gbps sustained streaming
<azonenberg> from my picoscope
<bvernoux> I imagine it was at least 4x less before ?
<azonenberg> clFFT wasnt much slower. but it was buggy
<bvernoux> ha ok
<azonenberg> i can benchmark an older commit at some point i guess
<azonenberg> anyway, right now only one of the fft-using filters (FFT itself) is using vkFFT so far
<azonenberg> there's still more work to do
<bvernoux> yes it is WIP
<azonenberg> bvernoux: anyway in case you missed some of the discussion above
<azonenberg> for simpler filter graphs like this, we're actually limited in framerate by GTK overhead
<azonenberg> We can add a lot of compute without slowing down because the filter graph runs in a background thread
<bvernoux> ha really again GTK strike ;)
<azonenberg> but the GUI thread is bogged down a lot by overhead
<azonenberg> more overhead than actual render calls, in fact
<bvernoux> ha it is also maybe why sometimes on my computer all is frozen
<bvernoux> I need to switch with Alt TAB to unlock it
<azonenberg> huh i have not seen that before
<bvernoux> probably an other GTK bug
<azonenberg> anyway, i'm beginning to think more seriously about migrating away from GTK
<azonenberg> but it's not a near term or high priority issue
<bvernoux> ha very great !!
<bvernoux> I push for that since years now ;)
<bvernoux> But I know it is something which take time
<bvernoux> a very great move will be Dear ImGUI + SDL2 for events
<azonenberg> I know :p but before, there were not valid engineering arguments backed by quantitative data to argue in favor of it
<azonenberg> now, there is
<bvernoux> SDL2 is part of VulkanSDK that will avoid an other dependency
<bvernoux> and we will have all in one
<azonenberg> So at this point, my proposal for the overall migration is to do one window/dialog at a time
<bvernoux> yes now we have more and more serious arguments against GTK
<azonenberg> Turn the window into a gtkglarea, then fill it with imgui widgets
<bvernoux> previously it was mainly issues for multiplatform but more we dig especially with glscopeclient more we see show stopper because of GTK
<azonenberg> once we've done this to the entire app, then transition the input handling and window creation to SDL
<azonenberg> or something else of that sort
<bvernoux> yes
<bvernoux> ha you are in favor of SDL2 too ?
<azonenberg> (and remove all remaining opengl in favor of vulkan at that time)
<bvernoux> for the events ?
<azonenberg> I havent done the research yet
<azonenberg> that's phase two
<bvernoux> yes it is not very important so far
<azonenberg> I think it makes sense to begin, as a pilot project, by replacing the filter graph editor with an imgui graph editor
<bvernoux> SDL2 or an other backend for events will be last step
<azonenberg> that's self contained and is, of the entire GUI, the most ugly and in critical need of replacement
<bvernoux> if you think to switch soon on Dear ImGui maybe switch directly to https://github.com/ocornut/imgui/commits/docking
<azonenberg> Like i said, my plan is to incrementally transition one window at a time, starting with the graph editor
<bvernoux> even if you do not plan to use docking at start
<azonenberg> perhaps even dual track the graph editor with tabs or something
<bvernoux> that will avoid some potential refactor after
<azonenberg> I'll look into it
<bvernoux> as anyway Dear IMGUI will merge the docking in main repo
<azonenberg> We might just wait until that's merged to main
<azonenberg> i'm not in a hurry
<azonenberg> But the transition has, based on that profiling data, moved from "never/years out" to "probably aim for 2023"
<bvernoux> yes it is great
<bvernoux> I'm convinced it is a winner solution for long term in all cases
<azonenberg> well lain likes it, so that's a plus
<bvernoux> Even KeySight and Tek will be interested as it is a major update on how to manage oscilloscope and more with very advanced UI
<bvernoux> They are far far away with their Gui which are in best case some ugly 2D blitter with Qt ;)
<azonenberg> Ultimately i would like to transition the waveform over/underlays from Cairo to hardware rendering as well
<azonenberg> but that's also a low priority
<bvernoux> Yes it is good to convince all guys working on the project
<azonenberg> imgui might make that easier
<azonenberg> lain says she was already a fan of it
<bvernoux> at start I was thinking I was the only one to be fan of Dear ImGui ;)
<bvernoux> I was convinced even more when seeing SDR++
<bvernoux> Which is used for Realtime display of SDR so it if very good to see how it is smooth with realtime SDR at more than 20MSPS
<bvernoux> It clearly beat everything in the area
<bvernoux> even SDR# which was one the best before
<azonenberg> Yeah. Well, previously my concern was mostly the effort to refactor it
<azonenberg> But i'm now seeing that the main thing limiting us to 20-30 FPS usable data rate is GTK
<azonenberg> i want to be able to do 60fps with multi Gbps of streaming waveforms
<bvernoux> yes it is an important point
<bvernoux> or even more for bigger GPU/Computer ;)
<azonenberg> well we'll be limited to 60fps with typical displays :p
<azonenberg> But my dream is to be fast enough, one day, that we can do digital phosphor persistence within single GPU frames
<azonenberg> i.e. if we have waveforms coming off the scope at 120 Hz, we can stack two per 60FPS video frame
<azonenberg> The docking features WRT being able to split WaveformArea's is definitely attractive. i could completely remove most/all of my existing splitter based window management
<azonenberg> Actually, thinking a bit more (ping lain)
<azonenberg> I guess there's a more fundamental question
<azonenberg> Does it even make sense to structure this as a port of glscopeclient in its current form?
<azonenberg> or would it makes sense to use this as an opportunity to do a more clean rearchitecture of the project
<azonenberg> and create a clean slate new frontend application, copying the shaders and other interesting bits from glscopeclient proper
<azonenberg> it would initially lag behind in feature set, but the intent would be to eventually transition everything over to it and then deprecate the GTK version
<azonenberg> my thought being that glscopeclient itself is essentially all GUI frontend code while the majority of the stuff that isn't gui toolkit specific is already in libscopehal/libscopeprotocols
<azonenberg> so how much of what's currently in glscopeclient would make sense to keep??
<azonenberg> there's definitely bits to keep - the shaders, most of the file format load/save code, the scope sync wizard backend
<azonenberg> but it's starting to look like the question is more "how much do we keep" than "how much do we rewrite"?
<azonenberg> lain: anyway, i'm wondering if it makes sense to create a new experimental app, say called "glscopeclient-imgui"
<azonenberg> start with basically the minimal UI chrome and allow you to connect to a scope and display waveforms
<azonenberg> (likely starting this after the vulkan refactor is done, so we can use imgui with the vulkan backend and then draw imgui widgets and waveforms seamlessly into a single app)
<azonenberg> get a feel for the performance and ease of working with it
<azonenberg> and then make a decision of whether we should cherry-pick glscopeclient into it, refactor glscopeclient a bit at a time, or axe the idea and look at alternative options
<azonenberg> in particular, complex filter graph support and file load/save support are explicitly *not* going to be supported in the test app
<azonenberg> maybe not even filter graph overlays at all
<azonenberg> just connecting to a single instrument, timebase configuration, a simple menu, adding/removing channels
<bvernoux> yes a restart to a clean glscopeclient-imgui seems to be clearly the best
<azonenberg> This would also be an excuse to fix a bunch of other things i've wanted to do, like a more clean document/view or MVC architecture vs the bit of spaghetti we have now as it organically grew over a couple of years
<bvernoux> To fully take advantage of ImGUI and avoid loosing time to port things and comparing GTK stuff to be converted to ImGUI ...
<bvernoux> It is why I say switch directly to imgui docking
<bvernoux> as it is really stable and it support docking & multi-view
<azonenberg> Yeah exactly. but like i said, the bigger issue is that we need to do some other refactoring and we really wouldn't be *keeping* a lot of code
<lain> azonenberg: I really like this idea also
<azonenberg> Ok so i think we're in agreement. Roadmap is as follows
<azonenberg> 1) finish porting renderer to Vulkan
<azonenberg> 2) finish replacing OpenCL with Vulkan
<azonenberg> 3) create minimum viable proof of concept UI
<azonenberg> with imgui and SDL
<azonenberg> 4) decide next course of action based on findings from 3
<azonenberg> lain: sound good?
<bvernoux> at same time as 4) you could check the Mac build too
<lain> yus!
<bvernoux> as it seems to be a dead end in actual glscopeclient
<azonenberg> bvernoux: lain is already working on the mac build, the vulkan renderer rewrite is a necessary prerequisite for that
<lain> bvernoux: I'm on the mac build, specifically apple silicon but I'll be testing on macos x86 as well
<azonenberg> we've already got everything compiling on arm64
<bvernoux> lain, do you have also standard PC with x86_64 to check the build is not broken ?
<lain> bvernoux: yep
<bvernoux> ha ok perfect
<bvernoux> at least to check Ubuntu x86_64 build ;)
<bvernoux> Windows is an other step but it is not far from Ubuntu x86_64 with mingw64 anyway
<lain> I'm testing arm64 and x86_64 linux, and for the macos work I'm testing x86_64 and arm64 (M1) mac
<lain> :3
<bvernoux> Do you are full time on that project ?
<lain> half time, ~20hr/wk, but yeah
<bvernoux> ha great
<azonenberg> Well, i guess 2022 is going to be the year of major shakeups in glscopeclient lol
<bvernoux> yes clearly
<bvernoux> You can also add a Sponsor icon for the project
<azonenberg> major data model rewrite, opengl compute -> vulkan, opencl -> vulkan, first paid developers, and now looking at leaving GTK too
<azonenberg> bvernoux: i'm actually talking w/ matt over the past few days about spinning up a legal entity for the project
<azonenberg> so we have a name people can write checks to
<bvernoux> ha great
<bvernoux> it could be also part of GSOC
<azonenberg> i dont want to do too much sponsorships before then. but absolutely we will be soliciting outside funding over time to pay more developers
<azonenberg> That is already on the todo for summer 20243
<azonenberg> 2023*
<azonenberg> if we can get things stable enough and a good cadre of experienced devs
<azonenberg> i cant mentor a bunch of gsoc folks myself
<azonenberg> so we need several core developers regularly contributing and who are familiar with the code to support that
<bvernoux> Yes it will be amazing to arrive quickly to a version 0.9 or even 1.0 ;)
<azonenberg> and better internal developer documentation
<lain> :D
<azonenberg> Anyway, from a high level i see the 2022 goals for the project to be all of the infrastructure work we need to really take off in 2023
<azonenberg> expanding the dev team, fixing key architectural limitations that are holding us back in legacy land, securing funding, getting more users in industry, building out relationships with T&M vendors, etc
<azonenberg> that is all in progress and proceeding nicely
<lain> extremely looking forward to all of this :3
<bvernoux> Have founding from Tek & Keysight ;)
<azonenberg> Lol
<bvernoux> IIRC they never have provided any founding in any open source projects
<azonenberg> That might be a stretch. but we are getting some pretty nice relationships solidified with smaller players
<bvernoux> but they are using tons of in their scope
<azonenberg> so far no budget, but several vendors are providing hardware for us to play with
<bvernoux> without open source their oscillscope will not exist at all
<azonenberg> I see our main source of funding not being T&M vendors, but users in industry and academia
<azonenberg> companies who are tired of spending millions of dollars a year on software options and getting awful UIs out of it
<bvernoux> yes T&M vendors have already their stuff and they want to keep them very closed ...
<azonenberg> as well as academic labs and research organizations
<azonenberg> CERN is definitely a place to reach out to, when the time is right
<bvernoux> yes clearly
<azonenberg> But we need to move slowly and carefully and plan things so we don't bite off more than we can chew
<azonenberg> bvernoux: anyway, i think i'm probably going to set up another developer zoom session some time later this month. I'll make an announcement in the channel a day or so in advance so people can ask for the link
<_whitenotifier-7> [scopehal-apps] bvernoux commented on issue #470: Windows CI build is broken despite finding Vulkan SDK - https://github.com/glscopeclient/scopehal-apps/issues/470#issuecomment-1236300519
<azonenberg> feel free to join and chime in next time
<bvernoux> ha yes great
<bvernoux> On my side I have very low value as my contribution are small and I have not (enough) time to work on glscopeclient
<bvernoux> But yes with pleasure
<azonenberg> Yeah i meant more jsut to sit in and watch
<azonenberg> not necessarily participating
<bvernoux> If I can bring something to the project I'm always happy to add my small contribution
<azonenberg> anyone here is welcome to sit in, although the intent is for it to mostly be a place for the active dev team to coordinate what's going on
<bvernoux> Vulkan(OpenGL/Shader) is clearly not my domain of expertise
<azonenberg> i'm brand new to Vulkan but have a decent bit of OpenGL experience and have done a lot of CUDA and OpenCL acceleration work in the past
<azonenberg> Ok so, in parallel with all that
<azonenberg> there is definitely room for someone to contribute on the documentation side
<azonenberg> i know lain said she was interested, but she's got other work on her plate at the moment
<azonenberg> So if anyone wants to work on that in the nearer term let me know
<azonenberg> in particular, documenting filter graph blocks
<azonenberg> Which is of course independent of any future gui rearchitecture we might be doing
<azonenberg> Also, wow we actually did not have that many opencl filters
<azonenberg> yes that would be great
<bvernoux> On actual state at least adding Vulkan SDK stuff
<bvernoux> for Linux & Windows
<azonenberg> Great
<azonenberg> looking at the list of kernels remaining it looks like just de-embed/channel emulation and FIR filter
<bvernoux> anyway so far the build is broken so it will requires an update
<azonenberg> so in the next few days, it's very possible we could completely remove the OpenCL / clFFT dependency
<azonenberg> then we'll just have opengl/vulkan and ffts
<azonenberg> and i expect in the fairly near future, FFTS will be relegated to test code. we'll still keep it around for cross checking stuff at least for a while
<azonenberg> but it will never be used unless you use developer arguments to disable the vulkan filters
<bvernoux> Just one things could we keep the actual https://github.com/glscopeclient/scopehal-apps master in a working state ?
<azonenberg> I don't push code unless it compiles and runs for me
<azonenberg> and i don't intentionally break things on other platforms, but of course this often happens by accident
<bvernoux> especially if the big refactor start
<bvernoux> to be in an other branch or even an other project
<bvernoux> to keep the old one working
<azonenberg> all of the big refactoring is done. the imgui stuff will be a completely separate application
<bvernoux> even if there will be no evolution in the old one
<azonenberg> within the same repo, so we can more cleanly copy code into the new app
<bvernoux> I just ask that to avoid breaking actual version for all platform
<azonenberg> yes, agreed
<bvernoux> the idea is they build with the CI
<azonenberg> glscopeclient won't be going anywhere until and unless the imgui version is completely usable as a replacement
<azonenberg> including fully compatible file format
<bvernoux> yes I know
<electronic_eel> when ffts is moved to testing only, will it be able to build glscopeclient completely without it? i would prefer that, because ffts is usually not available as package on most distros. so the option of leaving it out would ease packaging glscopeclient
<azonenberg> electronic_eel: Yes. that is very much a plan
<azonenberg> it will become an opt-in dependency at compile time. in that situation, if you run glscopeclient with --nogpufilter and try to do a filter requiring an FFT you'll get an error message
<azonenberg> and unit tests that do FFTs will fail
<azonenberg> Longer term still, we might move the CPU-only FFT code to the unit test itself (i.e. not in glscopeclient/libscopehal)
<electronic_eel> very nice, that makes dependencies easy
<azonenberg> at which point it would be OK to use e.g. fftw
<azonenberg> idgaf if our unit test binaries are GPL
<azonenberg> as long as we keep copyleft out of the actual app code and core libs
<electronic_eel> are all the interfaces into the fft libraries so similar that this much variability is feasible?
<azonenberg> For the most part it's a method you call to set up a plan object
<azonenberg> then a method you call to actually run a forward or reverse transform
<azonenberg> which takes a memory buffer for input and output data
<azonenberg> and there's a few different formats, most of what we do is real to complex forward and complex to real inverse
<azonenberg> with complex stored as interleaved real/imag real/imag pairs of fp32
<azonenberg> clFFT, vkFFT, and FFTS all work with the same memory layout and the APIs while not identical are pretty trivial to refactor. especially the CPU side ones
<azonenberg> the GPU side ones have more baggage wrt setting up command queues, not being able to just pass a raw pointer to the data but having to use a device memory handle, etc
<azonenberg> i have not used FFTW but i would imagine it would be trivial to drop in
<azonenberg> also, as things proceed further i would like to be able to create more extensive unit tests with better pass/fail criteria
<azonenberg> right now for the most part what the tests are doign is verifying that the GPU and CPU versions of a filter produce identical output within some epsilon
<azonenberg> but not necessarily that the algorithm both implement is correct
<electronic_eel> so you don't compare against a known good data dump?
<azonenberg> The subtract filter generates two random waveforms (with a constant seed - everythign is deterministic, or should be) and subtracts them with the generic CPU, AVX (if available), and GPU implementations of the filter
<azonenberg> and checks them all against literal subtraction in the unit test
<azonenberg> i also have a few basic assertions like input and output waveform length are equal, etc
<azonenberg> but for say the sin(x)/x upsampling, i just verify the two implementations match
<azonenberg> having known good data is a nice idea in theory, but we'd have to be very careful to avoid massive bloat of the repo
<azonenberg> especially since the tests double as benchmarks and typically work with megapoint scale inputs
<electronic_eel> couldn't many of the blobs be reused for many tests?
<azonenberg> For low level math functions, input could be reused. output would have to be separate per filter of course
<azonenberg> thats the issue
<electronic_eel> also i wouldn't mind an optional extra repo with the tests. you just have to download it if you want to run the tests
<azonenberg> So there is a scopehal-testdata repo now (i think thats the name)
<azonenberg> that contains a series of test/demo scopesession's
<azonenberg> including it as a submodule would not be unreasonable at some point
<azonenberg> but we'd have to also store golden output for each input
<azonenberg> right now a scopesession only stores the raw waveforms, not filter output
<azonenberg> (they're lazily evaluated at load time)
<azonenberg> so i'd need to export the golden waveform output from a filter to some interchange format and store that as well
<azonenberg> anyway, that's a later problem
<azonenberg> (and of course protocol input would have to be separate, although we could reuse some like e.g. a pcie waveform could be used for threshold, cdr, 8b10b, and each layer of pcie)
<azonenberg> basically as far as i'm concerned any tests are better than no tests
<azonenberg> right now the main thing i'm doing is writing gpu versions of existing filters
<azonenberg> so my pass criteria is "gives same answer as the existing filter"
<azonenberg> this will also catch regressions if we optimize something wrong, unless we make the same bug in both versions of the filter at once
<azonenberg> Better coverage is always a good thing
<azonenberg> but any tests beat no tests :p
<_whitenotifier-7> [scopehal-docs] bvernoux opened pull request #45: Add Install Vulkan SDK + Path for Linux(Ubuntu/Debian) and Windows(MSYS2/MINGW64) - https://github.com/glscopeclient/scopehal-docs/pull/45
<bvernoux> azonenberg, I still have issues with latest glscopeclient to restore a session correctly with offset/position of the different view
<bvernoux> It seems it affect only WIndows
<bvernoux> Question do you think it is a good idea to install Ubuntu 22.04 LTS on a dedicated disk (with multi boot) or to use the older Ubuntu 20.04 LTS ?
<bvernoux> I speak about a native install especially to test glscopeclient with HW acceleration(and check the support of my old GeForce GT 680M)
<bvernoux> It is always interesting to have a reference on a low end (old GPU) I think
<azonenberg> I would use more recent
<azonenberg> and i think we should, in theory, be able to run on hardware as far back as GTX 400 series
<azonenberg> wrt minimum for vulkan support
<bvernoux> yes the idea is just to do not accept issues specific to the old HW
<bvernoux> but until it works it is interesting to have idea of performances
<bvernoux> until it is not usable at all
<azonenberg> Yeah. At this point, my target minimum requirements are a 64-bit CPU and a GPU with vulkan 1.0 support
<bvernoux> just for fun so far my Asus CoreI7 + GeForce GT650M is faster in 3D and everything compared to brand new Dell Precision 5550...
<azonenberg> with vulkan 1.2 preferred as it enables acceleration of some stuff that we otherwise will have to do on the cpu
<bvernoux> Especially on Windows10
<bvernoux> my old GeForce GT650M seems supported with vulkan 1.2
<bvernoux> for info my Dell Precision 5550 have 64GB of RAM and a Intel SSD (the fastest available)
<bvernoux> but it is bloated by tons of IT stuff
<bvernoux> that I cannot remove of course
<bvernoux> as it is my company PC
<electronic_eel> bvernoux: how about dual booting some sane os on your dell. maybe plug in an additional ssd so you don't have to touch the partitioning of the original one
<bvernoux> I cannot install an other OS on it
<bvernoux> all is restricted
<bvernoux> and forbidden by IT
<bvernoux> I use wsl2 for that ...
<bvernoux> I do not want to hack it also of course
<bvernoux> Also adding an other external SSD over USB3 will work but BIOS is locked
<bvernoux> and I do not want to hack it and to have issues with my job ...
<bvernoux> It is just fun that on paper it is a beast but in reality with all bloated stuff installed by It/Company it is slower than my old Asus computer
<bvernoux> the most funny is even USB3 is slower
<bvernoux> Dell have done a very bad job with their HUB too
<bvernoux> Anyway we all know that latest Intel 12000 is bullshit and there is not 30% more speed on each new series since maybe serie 3 with CoreI7
<bvernoux> they have never changed anything on their CPU since 10 years stuck on their 14nm process
<electronic_eel> in my experience the intel alder lake series isn't that bad anymore. amd is currently still better in available core count and efficiency, but there are some workloads where the intel alder lakes are better
<electronic_eel> so it is not that clear cut anymore as it was a year or two ago
<electronic_eel> but my experience is only with desktop processors, not notebook ones
<d1b2> <Darius> you have to be pretty careful comparing note book CPUs because of the thermal limits imposed by the chassis they are in
<d1b2> <Darius> plus also old stuff doesn't have spectre et al mitigations
<Degi> Ooh, did we change from OpenGL to Vulkan?
<benishor> I can't believe I got it to build \o/. let me start first interaction with glscopeclient
* benishor fires up his SDS2104X+
<benishor> now to learn how to use glscopeclient
<bvernoux> Yes in my case I clearly compare laptop Intel CPU with different configuration
<bvernoux> @Degi, Yes big migration in progress to Vulkan
<Degi> Oh neat
<bvernoux> Lot of big development are coming
<bvernoux> also for mid/long term remove GTK and replace it with Dear ImGui and potentially SDL2
<bvernoux> @Degi, if you can check the history of IRC @azonenberg have added all details of the roadmap
<bvernoux> mainly
<bvernoux> <azonenberg> Ok so i think we're in agreement. Roadmap is as follows
<bvernoux> <azonenberg> 1) finish porting renderer to Vulkan
<bvernoux> <azonenberg> 3) create minimum viable proof of concept UI
<bvernoux> <azonenberg> 2) finish replacing OpenCL with Vulkan
<bvernoux> <azonenberg> with imgui and SDL
<bvernoux> <azonenberg> 4) decide next course of action based on findings from 3
<bvernoux> <azonenberg> lain: sound good?
bvernoux has quit [Quit: Leaving]
azonenberg has quit [Ping timeout: 268 seconds]
azonenberg has joined #scopehal
<azonenberg> Degi: So we are transitioning both rendering and compute from opengl/opencl to vulkan long term
<azonenberg> it's being done in a few phases
<azonenberg> right now, lain is rewriting the waveform renderer from opengl compute to vulkan compute and i'm converting all of the accelerated filters from opencl to vulkan compute
<azonenberg> at this phase we're keeping the compositor as GL and the GUI chrome as GTK
<azonenberg> I did some profiling yesterday which provided strong evidence that one of our biggest performance hits is GTK overhead now
<azonenberg> and it's limiting our framerate significantly
<azonenberg> in particular GTKGLArea is very inefficient
<azonenberg> so we did a bit of thinking and are looking at transitioning away from GTK longer term. several folks seem to like imgui and it has some really nice looking features so that's a strong candidate, but we havent made a final decision yet
<azonenberg> imgui is only a ui rendering library and doesnt handle window creation or input handling. for that, candidates are GLFW and SDL2
<azonenberg> glfw seems a bit more lightweight and doesnt include a lot of the fluff like audio handling that SDL2 provides which we don't need
<azonenberg> but at this point i don't have strong feelings one way or the other
<azonenberg> anyway, so then the remaining topic, to be brought up on the next dev call probably, is how to do the migration. I'm beginning to lean towards a from-scratch rewrite cherry-picking features from the GTK glscopeclient codebase
<azonenberg> basically, libscopehal/libscopeprotocols are all gui/platform agnostic for the most part. but glscopeclient proper is pretty much all GTK code
<azonenberg> which raises the question of how much of that code is plausible to keep
<azonenberg> there's some bits for sure, like the preference manager and rendering shaders
<azonenberg> but i expect ~80% will need to be rewritten
<_whitenotifier-7> [scopehal] azonenberg pushed 3 commits to master [+1/-1/±8] https://github.com/glscopeclient/scopehal/compare/c7487589343d...7961db3bf5a4
<_whitenotifier-7> [scopehal] azonenberg 5ea3198 - Improved error message
<_whitenotifier-7> [scopehal] azonenberg 9796dab - FIRFilter: removed OpenCL kernel implementation in preparation for Vulkan-ization
<_whitenotifier-7> [scopehal] azonenberg 7961db3 - FIRFilter: ported to Vulkan
<_whitenotifier-7> [scopehal-apps] azonenberg pushed 2 commits to master [+1/-0/±5] https://github.com/glscopeclient/scopehal-apps/compare/d861c2fbc191...5edca33a3ca8
<_whitenotifier-7> [scopehal-apps] azonenberg b73eafa - OscilloscopeWindow: no need to dispatch events in OnTimer anymore
<_whitenotifier-7> [scopehal-apps] azonenberg 5edca33 - Updated scopeprotocols. Added unit test for FIR filter.
<azonenberg> ok so at this point de-embed / channel emulation are the only remaining OpenCL filters
<azonenberg> i should be able to get rid of them today
<azonenberg> at which point we will be completely free of OpenCL and clFFT