engine: this GPU's own arithmetic and shared weight tiles as the builders' defaults

- layer_m.comp builds relaxed by default (M_RELAXED: f32 accumulators, paired FP8
  conversions, no activation table) with two windows per wave sharing weight tiles
  (WPW=2); M_EXACT=1 keeps NVIDIA's roundings, bit-identical to the CUDA path
- layer.comp reuses weight tiles across its waves (TPW=2 in the 32-channel layers)
- engine/rr/rr2_w.comp: one wave per window for preset F's dec0_0 and enc0, used by
  compile_rr2.py at the new default D4R_RR_RELAXED=3 (build_native_model.sh too);
  D4R_RR_FUSE=1 matches the reference's fused multiply-adds, ptx2rr.py --snorm16
- [Engine] Network defaults to vulkan; the HIP network is opt-in
This commit is contained in:
woutermans committed 2026-10-14 00:52:41 +02:00
1 parent 8eb7a94533
commit f0b55a850a
24 files changed
+1108 -254

No files matched your search

+5 -3
View File
@@ -674,8 +674,8 @@ static void load_portable_config()
portable_set("D4R_ENGINE", ini_flag(ini, "engine", "Enabled", 0) ? "1" : "0");
if (const std::string engineModel = ini_value(ini, "engine", "ModelDir"); !engineModel.empty())
portable_set(L"D4R_ENGINE_MODEL_DIR", portable_path(engineModel));
// Network: preset M's network on the native HIP layers ("hip", the default when the model has them: faster) or
// on the engine's Vulkan shader ("vulkan")
// Network: the network on the engine's Vulkan shader ("vulkan", and the default: "auto") or on the native HIP
// layers ("hip", when the model has them)
if (const std::string network = ini_value(ini, "engine", "Network"); network == "hip" || network == "vulkan")
portable_set("D4R_ENGINE_NETWORK", network);
else if (!network.empty() && network != "auto")
@@ -7748,8 +7748,10 @@ static bool create_engine_network(Feature& feature, const std::string& directory
bool stagesAvailable, unsigned int width, unsigned int height, size_t tokenBytes,
size_t headBytes)
{
// the Vulkan network unless [Engine] Network = hip asks for the native layers (2026-10-14: the shader with
// M_RELAXED and two windows per wave is faster than the HIP layers, engine/README.md)
const std::string choice = env_string("D4R_ENGINE_NETWORK");
if (choice == "vulkan")
if (choice != "hip")
return false;
auto unavailable = [&](const char* reason) {
logf("engine backend (%s): HIP network unavailable (%s); using the Vulkan network", preset, reason);