Add complete SDK implementations for accessing Synor Compute: JavaScript/TypeScript SDK (sdk/js/): - Full async/await API with TypeScript types - Tensor operations: matmul, conv2d, attention - Model inference with streaming support - WebSocket-based job monitoring - Browser and Node.js compatible Python SDK (sdk/python/): - Async/await with aiohttp - NumPy integration for tensors - Context managers for cleanup - Type hints throughout - PyPI-ready package structure Go SDK (sdk/go/): - Idiomatic Go with context support - Efficient binary tensor serialization - HTTP client with configurable timeouts - Zero external dependencies (stdlib only) All SDKs support: - Matrix multiplication (FP64 to INT4 precision) - Convolution operations (2D, 3D) - Flash attention - LLM inference - Spot pricing queries - Job polling and cancellation - Heterogeneous compute targeting (CPU/GPU/TPU/NPU/LPU)
44 lines
947 B
Python
44 lines
947 B
Python
"""
|
|
Synor Compute SDK for Python
|
|
|
|
Access distributed heterogeneous compute resources (CPU, GPU, TPU, NPU, LPU)
|
|
for AI/ML workloads at 90% cost reduction compared to traditional cloud.
|
|
|
|
Example:
|
|
>>> from synor_compute import SynorCompute
|
|
>>> compute = SynorCompute(api_key="your-api-key")
|
|
>>> result = await compute.matmul(a, b, precision="fp16")
|
|
"""
|
|
|
|
from .client import SynorCompute, SynorError
|
|
from .tensor import Tensor
|
|
from .job import ComputeJob, JobBatch
|
|
from .types import (
|
|
ProcessorType,
|
|
Precision,
|
|
BalancingStrategy,
|
|
TaskPriority,
|
|
JobStatus,
|
|
SynorConfig,
|
|
JobResult,
|
|
JobMetrics,
|
|
PricingInfo,
|
|
)
|
|
|
|
__version__ = "0.1.0"
|
|
__all__ = [
|
|
"SynorCompute",
|
|
"SynorError",
|
|
"Tensor",
|
|
"ComputeJob",
|
|
"JobBatch",
|
|
"ProcessorType",
|
|
"Precision",
|
|
"BalancingStrategy",
|
|
"TaskPriority",
|
|
"JobStatus",
|
|
"SynorConfig",
|
|
"JobResult",
|
|
"JobMetrics",
|
|
"PricingInfo",
|
|
]
|