cleanup(fflag): delete 7 dead transformer flags — [FFLAG-016, FFLAG-017]
HFTTransformerConfig had seven write-only bool flags with zero conditional readers anywhere in the workspace: - FFLAG-017: use_market_microstructure, use_order_book_features, use_trade_flow_features - FFLAG-016: use_flash_attention, use_sparse_attention, use_cuda_graphs, enable_profiling Each was declared + defaulted + asserted in tests, but no code branched on them. Deleted all 7 fields + Default init + production()/benchmark() setters + test assertions. Per feedback_no_feature_flags.md these were aspirational knobs — the features they nominally gated have no implementation.
This commit is contained in:
@@ -117,13 +117,8 @@ pub struct HFTTransformerConfig {
|
||||
|
||||
/// Feature configuration
|
||||
pub feature_dim: usize,
|
||||
pub use_market_microstructure: bool,
|
||||
pub use_order_book_features: bool,
|
||||
pub use_trade_flow_features: bool,
|
||||
|
||||
/// Optimization settings
|
||||
pub use_flash_attention: bool,
|
||||
pub use_sparse_attention: bool,
|
||||
pub attention_sparsity: f32,
|
||||
|
||||
/// Memory optimization
|
||||
@@ -132,8 +127,6 @@ pub struct HFTTransformerConfig {
|
||||
|
||||
/// Hardware settings
|
||||
pub device_type: DeviceType,
|
||||
pub use_cuda_graphs: bool,
|
||||
pub enable_profiling: bool,
|
||||
}
|
||||
|
||||
impl Default for HFTTransformerConfig {
|
||||
@@ -147,17 +140,10 @@ impl Default for HFTTransformerConfig {
|
||||
ff_dim: 256,
|
||||
seq_len: 64,
|
||||
feature_dim: 32,
|
||||
use_market_microstructure: true,
|
||||
use_order_book_features: true,
|
||||
use_trade_flow_features: true,
|
||||
use_flash_attention: true,
|
||||
use_sparse_attention: false,
|
||||
attention_sparsity: 0.1,
|
||||
pre_allocate_tensors: true,
|
||||
memory_pool_size: 1024 * 1024 * 64, // 64MB
|
||||
device_type: DeviceType::Cuda,
|
||||
use_cuda_graphs: false, // Enable after validation
|
||||
enable_profiling: false,
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -209,19 +195,14 @@ impl HFTTransformerConfig {
|
||||
/// Enable all optimizations for production deployment
|
||||
pub fn production() -> Self {
|
||||
Self {
|
||||
use_flash_attention: true,
|
||||
pre_allocate_tensors: true,
|
||||
use_cuda_graphs: true,
|
||||
..Self::micro()
|
||||
}
|
||||
}
|
||||
|
||||
/// Configuration for benchmarking and validation
|
||||
pub fn benchmark() -> Self {
|
||||
Self {
|
||||
enable_profiling: true,
|
||||
..Self::micro()
|
||||
}
|
||||
Self::micro()
|
||||
}
|
||||
}
|
||||
|
||||
@@ -252,8 +233,6 @@ mod tests {
|
||||
assert_eq!(nano.hidden_dim, 32);
|
||||
|
||||
let production = HFTTransformerConfig::production();
|
||||
assert!(production.use_flash_attention);
|
||||
assert!(production.pre_allocate_tensors);
|
||||
assert!(production.use_cuda_graphs);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user