@@ -127,7 +127,9 @@ class EnvVars
127127 // TDM (async tensor) options
128128 int tdmBlockSize; // Size of each threadblock for TDM (async tensor) kernels (must be multiple of 32)
129129 int tdmMaxLdsBytes; // Max LDS (shared memory) bytes per workgroup for TDM kernels (INT_MAX = use device max)
130- int tdmPipelined; // Use the pipelined (depth=2) TDM tensor kernel (0=non-pipelined, 1=pipelined)
130+ int tdmBlockOrder; // Worker ranking across blocks for TDM kernels (0=sequential, 1=interleaved)
131+ int tdmTemporal; // TDM non-temporal cache hint (0=none, 1=loads, 2=stores, 3=both)
132+ int tdmWordSize; // TDM tensor descriptor data-size encoding (advanced; default 2)
131133
132134 // Developer features
133135 int gpuMaxHwQueues; // Tracks GPU_MAX_HW_QUEUES environment variable
@@ -180,7 +182,9 @@ class EnvVars
180182 showPercentiles = GetEnvVarArray (" SHOW_PERCENTILES" , {});
181183 tdmBlockSize = GetEnvVar (" TDM_BLOCK_SIZE" , 256 );
182184 tdmMaxLdsBytes = GetEnvVar (" TDM_MAX_LDS_BYTES" , INT_MAX );
183- tdmPipelined = GetEnvVar (" TDM_PIPELINED" , 0 );
185+ tdmBlockOrder = GetEnvVar (" TDM_BLOCK_ORDER" , 0 );
186+ tdmTemporal = GetEnvVar (" TDM_TEMPORAL" , 0 );
187+ tdmWordSize = GetEnvVar (" TDM_WORD_SIZE" , 2 );
184188 useHipEvents = GetEnvVar (" USE_HIP_EVENTS" , 1 );
185189 useHsaDma = GetEnvVar (" USE_HSA_DMA" , 0 );
186190 useInteractive = GetEnvVar (" USE_INTERACTIVE" , 0 );
@@ -398,10 +402,14 @@ class EnvVars
398402 printf (" SHOW_BORDERS - Show ASCII box-drawing characters in tables\n " );
399403 printf (" SHOW_ITERATIONS - Show per-iteration timing info\n " );
400404 printf (" SHOW_PERCENTILES - Comma-separated percentiles iteration duration\n " );
405+ printf (" TDM_BLOCK_ORDER - TDM worker ranking across blocks. 0=sequential, 1=interleaved\n " );
401406 printf (" TDM_BLOCK_SIZE - # of threads per threadblock for TDM (async tensor) kernels (Must be multiple of 32)\n " );
402407 printf (" TDM_MAX_LDS_BYTES - Max LDS bytes per workgroup for TDM kernels (defaults to device max; K/M/G suffixes accepted)\n " );
403- printf (" TDM_PIPELINED - 1=use pipelined (depth=2) TDM kernel, 0=use non-pipelined kernel\n " );
404- printf (" USE_HIP_EVENTS - Use HIP events for GFX executor timing\n " );
408+ printf (" TDM_TEMPORAL - TDM non-temporal cache hint (0=none, 1=loads, 2=stores, 3=both)\n " );
409+ printf (" TDM_WORD_SIZE - TDM tensor descriptor data-size encoding (advanced; default 2)\n " );
410+ printf (" NOTE: T/A (TDM / async load-store) executors do NOT honor GFX_* or\n " );
411+ printf (" XCC_PREF_TABLE. Their threadblock size comes from TDM_BLOCK_SIZE.\n " );
412+ printf (" USE_HIP_EVENTS - Use HIP events for GFX/DMA/TDM executor timing (0=CPU wall-clock)\n " );
405413 printf (" USE_HSA_DMA - Use hsa_amd_async_copy instead of hipMemcpy for non-targeted DMA execution\n " );
406414 printf (" USE_INTERACTIVE - Pause for user-input before starting transfer loop\n " );
407415 printf (" USE_SINGLE_STREAM - Use a single stream per GPU GFX executor instead of stream per Transfer\n " );
@@ -543,16 +551,23 @@ class EnvVars
543551 " %s per-iteration timing" , showIterations ? " Showing" : " Hiding" );
544552 Print (" SHOW_PERCENTILES" , showPercentiles.empty () ? 0 : 1 , " %s" ,
545553 showPercentiles.empty () ? " Disabled" : GetStr (showPercentiles).c_str ());
554+ Print (" TDM_BLOCK_ORDER" , tdmBlockOrder,
555+ " TDM worker ranking: %s" , tdmBlockOrder == 0 ? " Sequential" : " Interleaved" );
546556 Print (" TDM_BLOCK_SIZE" , tdmBlockSize,
547557 " TDM threadblock size of %d" , tdmBlockSize);
548558 Print (" TDM_MAX_LDS_BYTES" , tdmMaxLdsBytes,
549559 " %s" , tdmMaxLdsBytes == INT_MAX
550560 ? " Using device max LDS bytes per workgroup"
551561 : (std::string (" Capping LDS to " ) + std::to_string (tdmMaxLdsBytes) + " bytes per workgroup" ).c_str ());
552- Print (" TDM_PIPELINED" , tdmPipelined,
553- " Using %s TDM tensor kernel" , tdmPipelined ? " pipelined (depth=2)" : " non-pipelined" );
562+ Print (" TDM_TEMPORAL" , tdmTemporal,
563+ " %s" , (tdmTemporal == 0 ? " Not using non-temporal hints" :
564+ tdmTemporal == 1 ? " Using non-temporal load hint" :
565+ tdmTemporal == 2 ? " Using non-temporal store hint" :
566+ " Using non-temporal load and store hints" ));
567+ Print (" TDM_WORD_SIZE" , tdmWordSize,
568+ " Using TDM tensor data-size encoding of %d" , tdmWordSize);
554569 Print (" USE_HIP_EVENTS" , useHipEvents,
555- " Using %s for GFX/DMA Executor timing" , useHipEvents ? " HIP events" : " CPU wall time" );
570+ " Using %s for GFX/DMA/TDM Executor timing" , useHipEvents ? " HIP events" : " CPU wall time" );
556571 Print (" USE_HSA_DMA" , useHsaDma,
557572 " Using %s for DMA execution" , useHsaDma ? " hsa_amd_async_copy" : " hipMemcpyAsync" );
558573 Print (" USE_INTERACTIVE" , useInteractive,
@@ -761,7 +776,10 @@ class EnvVars
761776
762777 cfg.tdm .blockSize = tdmBlockSize;
763778 cfg.tdm .maxLDSBytes = tdmMaxLdsBytes;
764- cfg.tdm .pipelined = tdmPipelined;
779+ cfg.tdm .useHipEvents = useHipEvents;
780+ cfg.tdm .blockOrder = tdmBlockOrder;
781+ cfg.tdm .temporalMode = tdmTemporal;
782+ cfg.tdm .wordSize = tdmWordSize;
765783
766784 return cfg;
767785 }
0 commit comments