]> zoso.dev Git - libnemo.git/log
libnemo.git
3 months agoReintroduce workload variable to allow hardware to control workgroup size, considered...
Chris Duncan [Sun, 5 Jan 2025 11:27:39 +0000 (03:27 -0800)]
Reintroduce workload variable to allow hardware to control workgroup size, considered most important control in that regard.

3 months agoAll arrays will eventually be deconstructed for performance, so start creating the...
Chris Duncan [Sun, 5 Jan 2025 11:24:33 +0000 (03:24 -0800)]
All arrays will eventually be deconstructed for performance, so start creating the variables now.

3 months agoRemove logging.
Chris Duncan [Sun, 5 Jan 2025 11:09:32 +0000 (03:09 -0800)]
Remove logging.

3 months agoSet local variable for UBO member to avoid slowly dereferencing it.
Chris Duncan [Sun, 5 Jan 2025 11:09:24 +0000 (03:09 -0800)]
Set local variable for UBO member to avoid slowly dereferencing it.

3 months agoUnroll blake compression rounds.
Chris Duncan [Sun, 5 Jan 2025 10:47:09 +0000 (02:47 -0800)]
Unroll blake compression rounds.

3 months agoPoW does not need to be secure, so just use basic fast PRNG.
Chris Duncan [Sun, 5 Jan 2025 10:46:51 +0000 (02:46 -0800)]
PoW does not need to be secure, so just use basic fast PRNG.

3 months agoRestart calculatino if nonce is not found, in order to accomodate smaller workgroup...
Chris Duncan [Sun, 5 Jan 2025 10:08:17 +0000 (02:08 -0800)]
Restart calculatino if nonce is not found, in order to accomodate smaller workgroup sizes. Suboptimal but can be improved later.

3 months agoSkip original pow tests for now. Reduce test suite size.
Chris Duncan [Sun, 5 Jan 2025 09:39:05 +0000 (01:39 -0800)]
Skip original pow tests for now. Reduce test suite size.

3 months agoFix copypasta typos in threshold check.
Chris Duncan [Sun, 5 Jan 2025 09:36:54 +0000 (01:36 -0800)]
Fix copypasta typos in threshold check.

3 months agoShortcut conditional by validating nonce prior to loading atomic. Remove redundant...
Chris Duncan [Sun, 5 Jan 2025 09:24:15 +0000 (01:24 -0800)]
Shortcut conditional by validating nonce prior to loading atomic. Remove redundant return statement.

3 months agoRevert nonce and found swap.
Chris Duncan [Sun, 5 Jan 2025 08:43:12 +0000 (00:43 -0800)]
Revert nonce and found swap.

3 months agoScrap in-shader loop since it is probably triggering browser watchdog timers as a...
Chris Duncan [Sun, 5 Jan 2025 08:00:31 +0000 (00:00 -0800)]
Scrap in-shader loop since it is probably triggering browser watchdog timers as a long-running process on lower-end hardware, just redispatch instead.

3 months agoRemove extraneous commenting. Move XOR to start of for loop. Whitespace.
Chris Duncan [Sun, 5 Jan 2025 07:10:13 +0000 (23:10 -0800)]
Remove extraneous commenting. Move XOR to start of for loop.  Whitespace.

3 months agoDecrease workgroup size and implement loop in shader main. Add some notes for potenti...
Chris Duncan [Sun, 5 Jan 2025 05:57:29 +0000 (21:57 -0800)]
Decrease workgroup size and implement loop in shader main. Add some notes for potential changes later.

3 months agoStress test block performance with PowGpu.
Chris Duncan [Sun, 5 Jan 2025 05:56:19 +0000 (21:56 -0800)]
Stress test block performance with PowGpu.

3 months agoSave some benchmarking notes.
Chris Duncan [Sun, 5 Jan 2025 05:55:19 +0000 (21:55 -0800)]
Save some benchmarking notes.

3 months agoDocument construction and purpose of thread ID.
Chris Duncan [Sun, 5 Jan 2025 05:48:17 +0000 (21:48 -0800)]
Document construction and purpose of thread ID.

3 months agoChange loop index variable name in G mixing function so it does not collide with...
Chris Duncan [Sat, 4 Jan 2025 23:20:03 +0000 (15:20 -0800)]
Change loop index variable name in G mixing function so it does not collide with other declarations elsewhere.

3 months agoPush new bundles for platform testing.
Chris Duncan [Sat, 4 Jan 2025 12:07:23 +0000 (04:07 -0800)]
Push new bundles for platform testing.

3 months agoRestore additional block performance tests now that PowGpu is working.
Chris Duncan [Sat, 4 Jan 2025 12:05:02 +0000 (04:05 -0800)]
Restore additional block performance tests now that PowGpu is working.

3 months agoAdd PowGpu performance tests outside of Block scope and Web Workers.
Chris Duncan [Sat, 4 Jan 2025 12:04:29 +0000 (04:04 -0800)]
Add PowGpu performance tests outside of Block scope and Web Workers.

3 months agoReset `found` flag between executions.
Chris Duncan [Sat, 4 Jan 2025 12:00:48 +0000 (04:00 -0800)]
Reset `found` flag between executions.

3 months agoExport PowGpu from main for users beyond Blocks. Small comment.
Chris Duncan [Sat, 4 Jan 2025 11:18:56 +0000 (03:18 -0800)]
Export PowGpu from main for users beyond Blocks. Small comment.

3 months agoConfigure UBO buffer during static initialization.
Chris Duncan [Sat, 4 Jan 2025 10:42:48 +0000 (02:42 -0800)]
Configure UBO buffer during static initialization.

3 months agoFix threshold offset in Javascript. Tweak commenting and remove logging.
Chris Duncan [Sat, 4 Jan 2025 09:47:41 +0000 (01:47 -0800)]
Fix threshold offset in Javascript. Tweak commenting and remove logging.

3 months agoPass in random data to initialize nonce.
Chris Duncan [Sat, 4 Jan 2025 09:22:26 +0000 (01:22 -0800)]
Pass in random data to initialize nonce.

3 months agoReduce block performance test for getting powgpu right.
Chris Duncan [Sat, 4 Jan 2025 09:17:00 +0000 (01:17 -0800)]
Reduce block performance test for getting powgpu right.

3 months agoRemove logging.
Chris Duncan [Sat, 4 Jan 2025 08:42:56 +0000 (00:42 -0800)]
Remove logging.

3 months agoMove atomic check to start of main. Add atomic check prior to setting nonce.
Chris Duncan [Sat, 4 Jan 2025 08:34:02 +0000 (00:34 -0800)]
Move atomic check to start of main. Add atomic check prior to setting nonce.

3 months agoTweak logging.
Chris Duncan [Sat, 4 Jan 2025 07:45:08 +0000 (23:45 -0800)]
Tweak logging.

3 months agoWhitespace.
Chris Duncan [Sat, 4 Jan 2025 07:37:22 +0000 (23:37 -0800)]
Whitespace.

3 months agoDo a bit reversal to create a psuedo random looking nonce even though it mathematical...
Chris Duncan [Sat, 4 Jan 2025 04:55:25 +0000 (20:55 -0800)]
Do a bit reversal to create a psuedo random looking nonce even though it mathematically doesn't matter if it's truly random or not.

3 months agoBundle changes to test on other platforms.
Chris Duncan [Fri, 3 Jan 2025 23:03:36 +0000 (15:03 -0800)]
Bundle changes to test on other platforms.

3 months agoFix nonce output to CPU which is expecting the 32-bit values in reverse for reasons...
Chris Duncan [Fri, 3 Jan 2025 22:58:23 +0000 (14:58 -0800)]
Fix nonce output to CPU which is expecting the 32-bit values in reverse for reasons I don't fully understand, something to do with endianness I'm sure.

3 months agoRemove redundant comment.
Chris Duncan [Fri, 3 Jan 2025 22:43:43 +0000 (14:43 -0800)]
Remove redundant comment.

3 months agoRename variables for a little more clarity.
Chris Duncan [Fri, 3 Jan 2025 18:51:09 +0000 (10:51 -0800)]
Rename variables for a little more clarity.

3 months agoChange blake2b function name to align with reference implementation.
Chris Duncan [Fri, 3 Jan 2025 17:15:46 +0000 (09:15 -0800)]
Change blake2b function name to align with reference implementation.

3 months agoTweak commenting and test loop size.
Chris Duncan [Fri, 3 Jan 2025 17:14:36 +0000 (09:14 -0800)]
Tweak commenting and test loop size.

3 months agoOnly try to load GPU every tenth of a second.
Chris Duncan [Thu, 2 Jan 2025 21:49:59 +0000 (13:49 -0800)]
Only try to load GPU every tenth of a second.

3 months agoExtend dispatch dimensions. Tweak commenting.
Chris Duncan [Thu, 2 Jan 2025 21:49:25 +0000 (13:49 -0800)]
Extend dispatch dimensions. Tweak commenting.

3 months agoRemove unused RAF call. Warn user if pow completed without a nonce.
Chris Duncan [Thu, 2 Jan 2025 21:48:15 +0000 (13:48 -0800)]
Remove unused RAF call. Warn user if pow completed without a nonce.

3 months agoEnsure nonce hex string is 16 characters.
Chris Duncan [Thu, 2 Jan 2025 21:47:03 +0000 (13:47 -0800)]
Ensure nonce hex string is 16 characters.

3 months agoInitialize v before computation loop. Change from potentially-endless while loop...
Chris Duncan [Thu, 2 Jan 2025 21:46:41 +0000 (13:46 -0800)]
Initialize v before computation loop. Change from potentially-endless while loop to restricted for loop.

3 months agoTest against actual threshold.
Chris Duncan [Thu, 2 Jan 2025 21:43:40 +0000 (13:43 -0800)]
Test against actual threshold.

3 months agoExplicitly specify units are unsigned.
Chris Duncan [Thu, 2 Jan 2025 21:42:56 +0000 (13:42 -0800)]
Explicitly specify units are unsigned.

3 months agoDereference array args instead of creating copies.
Chris Duncan [Thu, 2 Jan 2025 21:39:18 +0000 (13:39 -0800)]
Dereference array args instead of creating copies.

3 months agoExplicitly specify integers are unsigned.
Chris Duncan [Thu, 2 Jan 2025 20:57:09 +0000 (12:57 -0800)]
Explicitly specify integers are unsigned.

3 months agoTweak author credit comment for BLAKE2b derivation since this class is quite unlike...
Chris Duncan [Thu, 2 Jan 2025 17:23:52 +0000 (09:23 -0800)]
Tweak author credit comment for BLAKE2b derivation since this class is quite unlike the original now except for the hash function.

3 months agoFix default export const to separate this class from original Pow class.
Chris Duncan [Thu, 2 Jan 2025 17:23:04 +0000 (09:23 -0800)]
Fix default export const to separate this class from original Pow class.

3 months agoFix invocation ID construction. Add "found" flag as an atomic. Remove randomized...
Chris Duncan [Thu, 2 Jan 2025 16:33:37 +0000 (08:33 -0800)]
Fix invocation ID construction. Add "found" flag as an atomic. Remove randomized value from Javascript since shader will just iterate nonces itself. Delete unused hexify function since we can just use built-in BigInt functions now.

3 months agoStart experimenting with 4-byte assignment using workgroup size as 1 byte via local_i...
Chris Duncan [Thu, 2 Jan 2025 13:55:02 +0000 (05:55 -0800)]
Start experimenting with 4-byte assignment using workgroup size as 1 byte via local_invocation_id and then 3 dimensions in dispatch as 3 more bytes via workgroup_id.x/y/z, all concatenated into global_invocation_id. Looping in compute shaders is also OK versus fragment shaders, so iterate within the shader instead of reading out every frame with CPU.

3 months agoClean up commenting.
Chris Duncan [Thu, 2 Jan 2025 13:52:46 +0000 (05:52 -0800)]
Clean up commenting.

3 months agoFix pointer dereferencing which was creating a copy instead of modifying pointee.
Chris Duncan [Thu, 2 Jan 2025 13:50:34 +0000 (05:50 -0800)]
Fix pointer dereferencing which was creating a copy instead of modifying pointee.

3 months agoChange work vector to 3 dimensions to store "found" flag.
Chris Duncan [Thu, 2 Jan 2025 13:49:38 +0000 (05:49 -0800)]
Change work vector to 3 dimensions to store "found" flag.

3 months agoRemove zero threshold from block used for testing.
Chris Duncan [Thu, 2 Jan 2025 13:48:41 +0000 (05:48 -0800)]
Remove zero threshold from block used for testing.

3 months agoPrepare to write out entire work value. Revert to global invocation id so larger...
Chris Duncan [Wed, 1 Jan 2025 10:36:53 +0000 (02:36 -0800)]
Prepare to write out entire work value. Revert to global invocation id so larger workloads can be supported later.

3 months agoClarified limitations of workgroup dispatching and sizes and corrected how workload...
Chris Duncan [Wed, 1 Jan 2025 10:08:33 +0000 (02:08 -0800)]
Clarified limitations of workgroup dispatching and sizes and corrected how workload is determined and passed into the shader, including bytes available for each pass (hint: we will always need to pass in at least some crypto bytes due to sheer size of computation, i.e. 256x256 is 65k nonces but only 2 bytes of 8 required). Start filling out actual hashing function.

3 months agoPoint block pow to PowGpu for testing.
Chris Duncan [Tue, 31 Dec 2024 22:36:56 +0000 (14:36 -0800)]
Point block pow to PowGpu for testing.

3 months agoRefactor WebGPU pow to align with MDN compute shader example which was clearer to...
Chris Duncan [Tue, 31 Dec 2024 22:36:42 +0000 (14:36 -0800)]
Refactor WebGPU pow to align with MDN compute shader example which was clearer to follow and to improve alignment with intended work generation algorithm.

3 months agoInitial WebGPU conversion.
Chris Duncan [Tue, 31 Dec 2024 01:53:55 +0000 (17:53 -0800)]
Initial WebGPU conversion.

3 months agoRedefine shader ints as uints where applicable, and specify types explicitly when...
Chris Duncan [Mon, 30 Dec 2024 22:35:19 +0000 (14:35 -0800)]
Redefine shader ints as uints where applicable, and specify types explicitly when using literal numerals. Restore some basic frame timing to keep track of performance gain or loss.

3 months agoAdd typings for WebGPU created by the W3C working group.
Chris Duncan [Mon, 30 Dec 2024 14:54:08 +0000 (06:54 -0800)]
Add typings for WebGPU created by the W3C working group.

3 months agoCopy pow file to start converting it to WebGPU.
Chris Duncan [Mon, 30 Dec 2024 13:47:03 +0000 (05:47 -0800)]
Copy pow file to start converting it to WebGPU.

3 months agoPush latest updates to global file for mobile testing.
Chris Duncan [Sun, 29 Dec 2024 10:16:49 +0000 (02:16 -0800)]
Push latest updates to global file for mobile testing.

3 months agoRemove logging.
Chris Duncan [Sun, 29 Dec 2024 10:04:40 +0000 (02:04 -0800)]
Remove logging.

3 months agoWrite test to validate generated PoW.
Chris Duncan [Sun, 29 Dec 2024 10:03:54 +0000 (02:03 -0800)]
Write test to validate generated PoW.

3 months agoRemove receive block from performance testing since it will always be slower then...
Chris Duncan [Sun, 29 Dec 2024 09:24:10 +0000 (01:24 -0800)]
Remove receive block from performance testing since it will always be slower then sends.

3 months agoConvert work uniform to UBO.
Chris Duncan [Fri, 27 Dec 2024 08:11:24 +0000 (00:11 -0800)]
Convert work uniform to UBO.

3 months agoAdd blockhash to UBO.
Chris Duncan [Fri, 27 Dec 2024 06:36:26 +0000 (22:36 -0800)]
Add blockhash to UBO.

3 months agoMove threshold and workload into UBO. Remove temp vars used for logging.
Chris Duncan [Fri, 27 Dec 2024 05:03:44 +0000 (21:03 -0800)]
Move threshold and workload into UBO. Remove temp vars used for logging.

3 months agoFix receive threshold.
Chris Duncan [Tue, 24 Dec 2024 10:22:26 +0000 (02:22 -0800)]
Fix receive threshold.

3 months agoLog work value in block perf test.
Chris Duncan [Tue, 24 Dec 2024 10:12:37 +0000 (02:12 -0800)]
Log work value in block perf test.

3 months agoDelete performance and console logging in Pow.
Chris Duncan [Tue, 24 Dec 2024 08:06:08 +0000 (00:06 -0800)]
Delete performance and console logging in Pow.

3 months agoDelete unused files.
Chris Duncan [Tue, 24 Dec 2024 08:05:54 +0000 (00:05 -0800)]
Delete unused files.

3 months agoRemove unused commented code.
Chris Duncan [Tue, 24 Dec 2024 07:21:36 +0000 (23:21 -0800)]
Remove unused commented code.

3 months agoClarify which benchmarks belong to which project.
Chris Duncan [Mon, 23 Dec 2024 20:24:34 +0000 (12:24 -0800)]
Clarify which benchmarks belong to which project.

3 months agoFormatting.
Chris Duncan [Sun, 22 Dec 2024 18:53:54 +0000 (10:53 -0800)]
Formatting.

3 months agoFix appending to innerHTML. Add per-work times to output.
Chris Duncan [Sun, 22 Dec 2024 18:44:50 +0000 (10:44 -0800)]
Fix appending to innerHTML. Add per-work times to output.

3 months agoFix reference.
Chris Duncan [Sun, 22 Dec 2024 17:48:33 +0000 (09:48 -0800)]
Fix reference.

3 months agoFull url for testing lib on mobile.
Chris Duncan [Sun, 22 Dec 2024 17:46:17 +0000 (09:46 -0800)]
Full url for testing lib on mobile.

3 months agoUpload build for online testing.
Chris Duncan [Sun, 22 Dec 2024 08:48:08 +0000 (00:48 -0800)]
Upload build for online testing.

3 months agoLine breaks.
Chris Duncan [Sun, 22 Dec 2024 08:39:23 +0000 (00:39 -0800)]
Line breaks.

3 months agoPost work as it is calculated to testing page.
Chris Duncan [Sat, 21 Dec 2024 16:08:17 +0000 (08:08 -0800)]
Post work as it is calculated to testing page.

3 months agoStart building out visible content in testing webpage.
Chris Duncan [Sat, 21 Dec 2024 16:06:16 +0000 (08:06 -0800)]
Start building out visible content in testing webpage.

3 months agoIncrease block performance count now that it's basically done.
Chris Duncan [Sat, 21 Dec 2024 15:26:25 +0000 (07:26 -0800)]
Increase block performance count now that it's basically done.

3 months agoKeep Pow pool static across all Block instances.
Chris Duncan [Sat, 21 Dec 2024 15:26:04 +0000 (07:26 -0800)]
Keep Pow pool static across all Block instances.

3 months agoCombine work bytes for upload to GPU and split them in the shader. Clear performance...
Chris Duncan [Sat, 21 Dec 2024 15:25:35 +0000 (07:25 -0800)]
Combine work bytes for upload to GPU and split them in the shader. Clear performance measure once it's been saved to frameTimes.

3 months agoFix listener not being inherited properly by classes extending WorkerInterface.
Chris Duncan [Sat, 21 Dec 2024 03:16:25 +0000 (19:16 -0800)]
Fix listener not being inherited properly by classes extending WorkerInterface.

3 months agoConvert NanoNaCl to actual class to ease import/export. Refactor pool and workers...
Chris Duncan [Fri, 20 Dec 2024 23:15:55 +0000 (15:15 -0800)]
Convert NanoNaCl to actual class to ease import/export. Refactor pool and workers back to instantiated pools with quantity controls.

3 months agoLinting.
Chris Duncan [Fri, 20 Dec 2024 17:05:26 +0000 (09:05 -0800)]
Linting.

3 months agoRename pow worker file to indicate it uses WebGL so that we can perhaps port to a...
Chris Duncan [Thu, 19 Dec 2024 13:27:26 +0000 (05:27 -0800)]
Rename pow worker file to indicate it uses WebGL so that we can perhaps port to a new one using WebGPU.

3 months agoTemporarily log frame time averages until changes are deemed OK to push to main.
Chris Duncan [Thu, 19 Dec 2024 02:38:29 +0000 (18:38 -0800)]
Temporarily log frame time averages until changes are deemed OK to push to main.

3 months agoTest receive block first.
Chris Duncan [Wed, 18 Dec 2024 23:51:46 +0000 (15:51 -0800)]
Test receive block first.

3 months agoMove uniform transfers outside of draw loop where possible.
Chris Duncan [Wed, 18 Dec 2024 23:50:30 +0000 (15:50 -0800)]
Move uniform transfers outside of draw loop where possible.

3 months agoSingle-pixel rendering idea hurt performance, so scrap the setup for it and just...
Chris Duncan [Wed, 18 Dec 2024 22:47:00 +0000 (14:47 -0800)]
Single-pixel rendering idea hurt performance, so scrap the setup for it and just render to the default framebuffer.

4 months agoGet query version working by storing and reading the entire canvas as before, probabl...
Chris Duncan [Wed, 18 Dec 2024 16:42:15 +0000 (08:42 -0800)]
Get query version working by storing and reading the entire canvas as before, probably an issue with xy coordinates being used to fetch work bytes. Anyway, it's loads faster now, but loading up all 16 workers is a no-go, so that needs work. Also would be nice to reduce the canvas viewport and associated renderbuffer to a single pixel since that's all we need.

4 months agoSet clear color in static initializer.
Chris Duncan [Tue, 17 Dec 2024 22:36:19 +0000 (14:36 -0800)]
Set clear color in static initializer.

4 months agoReformat original PoW credit.
Chris Duncan [Tue, 17 Dec 2024 20:55:00 +0000 (12:55 -0800)]
Reformat original PoW credit.

4 months agoFormatting.
Chris Duncan [Tue, 17 Dec 2024 15:11:25 +0000 (07:11 -0800)]
Formatting.

4 months agoMake pixel array static so it can be allocated once and reused.
Chris Duncan [Tue, 17 Dec 2024 14:00:18 +0000 (06:00 -0800)]
Make pixel array static so it can be allocated once and reused.