Instructions to use cahlen/flint-hills-cuda with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Kernels
How to use cahlen/flint-hills-cuda with Kernels:
# !pip install kernels from kernels import get_kernel # a version (or an explicit revision) is required; see the "Files and versions" tab for the available ones kernel = get_kernel("cahlen/flint-hills-cuda", version=1) - Notebooks
- Google Colab
- Kaggle
File size: 427 Bytes
42ef9b5 | 1 2 3 4 5 6 7 8 9 10 11 | """CPU-only verification test for Flint Hills Series"""
print("Testing flint-hills-cuda...")
import math
S10 = sum(1.0 / (n**3 * math.sin(n)**2) for n in range(1, 11))
print(f" S_10 = {S10:.6f}")
assert 3.0 < S10 < 4.0, f"S_10 out of expected range: {S10}"
S100 = sum(1.0 / (n**3 * math.sin(n)**2) for n in range(1, 101))
print(f" S_100 = {S100:.6f}")
assert S100 > S10, "S_100 should be > S_10"
print(f"\n2/2 tests passed")
|