Jackoatmon commited on
Commit
cf613e8
·
verified ·
1 Parent(s): 24350e5

Update Feather H200 training runtime image

Browse files
overlay/htm_rust/src/gpu/mod.rs CHANGED
@@ -38,6 +38,11 @@ use fused::FusedState;
38
  fn htm_gpu_fused_available() -> bool {
39
  matches!(option_env!("HTM_GPU_FUSED_AVAILABLE"), Some("1"))
40
  }
 
 
 
 
 
41
 
42
  /// Extract (device_ptr, shape, typestr) from a `__cuda_array_interface__` dict.
43
  /// Returns Err if the dict is malformed. Used by `step_many_cuda` to wrap
@@ -576,8 +581,9 @@ fn step_batch_fused_cuda(
576
  Ok(())
577
  }
578
 
579
- pub fn register(m: &Bound<'_, PyModule>) -> PyResult<()> {
580
- m.add_class::<HTMRegionGpu>()?;
581
- m.add_function(pyo3::wrap_pyfunction!(step_batch_fused_cuda, m)?)?;
582
- Ok(())
583
- }
 
 
38
  fn htm_gpu_fused_available() -> bool {
39
  matches!(option_env!("HTM_GPU_FUSED_AVAILABLE"), Some("1"))
40
  }
41
+
42
+ #[pyfunction]
43
+ fn gpu_fused_available() -> bool {
44
+ htm_gpu_fused_available()
45
+ }
46
 
47
  /// Extract (device_ptr, shape, typestr) from a `__cuda_array_interface__` dict.
48
  /// Returns Err if the dict is malformed. Used by `step_many_cuda` to wrap
 
581
  Ok(())
582
  }
583
 
584
+ pub fn register(m: &Bound<'_, PyModule>) -> PyResult<()> {
585
+ m.add_class::<HTMRegionGpu>()?;
586
+ m.add_function(pyo3::wrap_pyfunction!(step_batch_fused_cuda, m)?)?;
587
+ m.add_function(pyo3::wrap_pyfunction!(gpu_fused_available, m)?)?;
588
+ Ok(())
589
+ }
overlay/subsystems/__pycache__/htm.cpython-312.pyc CHANGED
Binary files a/overlay/subsystems/__pycache__/htm.cpython-312.pyc and b/overlay/subsystems/__pycache__/htm.cpython-312.pyc differ
 
overlay/subsystems/htm.py CHANGED
@@ -54,8 +54,15 @@ _HTM_HAS_CAI = _HTM_HAS_GPU and hasattr(htm_rust.HTMRegionGpu, "step_many_cuda")
54
  # inhibition (see htm_rust/docs/GPU_HTM.md §Fused Kernel).
55
  # Opt-in via env var (default on when available).
56
  import os as _os_fused
57
- _HTM_HAS_FUSED = _HTM_HAS_GPU and hasattr(htm_rust.HTMRegionGpu, "step_many_fused_cuda")
58
- _HTM_USE_FUSED = _HTM_HAS_FUSED and bool(int(_os_fused.environ.get("HYDRA_HTM_FUSED", "1")))
 
 
 
 
 
 
 
59
 
60
 
61
  class HTMLayer(nn.Module):
 
54
  # inhibition (see htm_rust/docs/GPU_HTM.md §Fused Kernel).
55
  # Opt-in via env var (default on when available).
56
  import os as _os_fused
57
+ _HTM_HAS_FUSED = _HTM_HAS_GPU and hasattr(htm_rust.HTMRegionGpu, "step_many_fused_cuda")
58
+ _HTM_GPU_FUSED_RUNTIME = bool(
59
+ _HTM_HAS_FUSED and hasattr(htm_rust, "gpu_fused_available") and htm_rust.gpu_fused_available()
60
+ )
61
+ _HTM_USE_FUSED = (
62
+ _HTM_HAS_FUSED
63
+ and _HTM_GPU_FUSED_RUNTIME
64
+ and bool(int(_os_fused.environ.get("HYDRA_HTM_FUSED", "1")))
65
+ )
66
 
67
 
68
  class HTMLayer(nn.Module):