Conversation
…single-thread Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
…threshold Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
…iable Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
|
@copilot continue, we want to test gpu impact. Also the loop count alone is not a good indicator of overall complexity, a 1million iterations loop with 1 instruction each is less complex than a 10k iteration loop with 1k instructions each, which would be a perfect candidate for parallization and gpu usage |
…tions) and add GPU impact projection Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
Implemented in 343fe60 and 42d88e7: Complexity-based threshold: Changed from simple iteration count to
GPU impact: Added projection test based on BlurPerformanceTests CUDA reference data (143x speedup). For 4K brightness adjustment: SingleThread ~1.8s, ParallelCpu ~730ms (2.5x), projected GPU ~92ms (20x, conservative estimate since real CUDA showed 143x for blur). The test validates projected GPU time beats CPU parallel. Threshold constant is |
…ia unrolled interior kernel Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
…zes instead Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
…e Cuda.Tests how CPU, Single threaded vs Parallized vs GPU performs. What matters is implementation to Mlir generation
…2 of GpuSupportPlan) Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
… with Phase 2 implementation status Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
…still need to be checked. Other projects also need to be updated, but not much work left ..
…e simplified, but we are far away from functional ..
…ow, seems like 80% of code there is not that useful and can still be simplified
…es, started work on BinaryGenerator
… need some more cleanup, but lets first fix all projects and tests, then more refactoring
…rs in all projects Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
…BinaryMethod simplified again, more work to be done, still plenty of TODOs
…ing the low level dependencies
…more before final round of refactoring.
…es, basically all the constants we have anyway in Strict.Language
…, VirtualMachine getting slightly better, more work to be done
…red CompiledMethodInfo and CollectMethods - Remove IsPlatformUsingStdLibAndHasPrintInstructionsInternal (callers will use BinaryExecutable.UsesConsolePrint) - Remove HasPrintInstructionsInternal (callers will use BinaryExecutable.UsesConsolePrint) - Add protected sealed CompiledMethodInfo class to deduplicate from 3 subclasses - Add CollectMethods, BuildMethodInfo, BuildMethodSymbol, EnqueueInvokedMethods, HasNumericPrint shared methods - Use new List<Instruction>(precompiled) instead of collection expression for ternary compatibility Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
… private, remove HasPrintInstructions/IsPlatformUsingStdLib, move shared code to base class, remove dead Runner methods Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
- Replace compiler.Compile(method) with CompileMethod(method) helper - Replace compiler.CompileForPlatform calls with Compile(instructions, platform) helper - Simplify complex tests using BinaryGenerator to produce full binaries - Remove unused BuildMethodKey and GenerateMethodInstructions helpers - Add three new private helpers: CompileMethod, Compile(instructions), Compile(binary) - Update assertions for tests that used custom method names to use 'Run' - Remove unused Strict.Bytecode.Serialization using Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace all CompileForPlatform calls with Compile helper methods - Replace HasPrintInstructions tests with BinaryExecutable.UsesConsolePrint - Simplify BinaryExecutable tests to use BinaryGenerator directly - Remove BuildMethodKey and GenerateMethodInstructions helpers - Remove unused Strict.Bytecode.Serialization import Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Replace all compiler.CompileForPlatform() calls with Compile() helper - Replace compiler.HasPrintInstructions() with BinaryExecutable.UsesConsolePrint - Simplify BinaryGenerator tests by removing manual precompiled dictionaries - Remove unused BuildMethodKey and GenerateMethodInstructions helpers - Remove unused Strict.Bytecode.Serialization import - Update assertion strings to reflect 'Run' entry point naming Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…instead of CompileForPlatform, remove duplicate helpers, simplify Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
Co-authored-by: BenjaminNitschke <1650127+BenjaminNitschke@users.noreply.github.com>
…, removed old serializer and deserializer tests that are unused and not really compatible anymore, new tests are in BinaryExecutableTests
…ed benchmark VirtualMachine, but it is fast in benchmark and horribly slow in NCrunch, hard to say ..
The BytecodeDeserializer was left in a half-reworked state:
TypeEntryData,Package,Instructions,PrecompiledMethodswere inside a TODO comment block,Deserialize()referenced non-existent variables, and Runner.cs had incomplete statements. Nothing compiled.BytecodeDeserializer
TypeEntryDataas private class, fixedDeserialize(Package)to read ZIP entries, extract metadata intoBytecodeTypes, and read instructionsReadTypeMetadataIntoBytecodeTypes— captures member/method string data intoBytecodeTypes.TypeMembersAndMethodswhile still creating Language types needed for instruction deserializationBuildMethodInstructionKeyformat (TypeName|MethodName|ParamCount) consistently — matches what VirtualMachine expects for precompiled method lookupBytecodeTypes
method.FullName.Name→method.Name(FullName is already a string)Findto useBuildMethodInstructionKeyformat via sharedGetTypeNameFromEntryNameRunner
package,mainType,currentFolderfor both.strictsource and.strictbinaryinputBuild()andRun()now branch ondeserializedBytecodeTypes != nullto handle bytecode-loaded vs source-loaded typesUsage after changes
Test results
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.