Skip to content

Commit

Permalink
Add xpu in env report (#443)
Browse files Browse the repository at this point in the history
## Summary
Add XPU in env report

## Testing Done
Arc 770, Requires test on PVC (@faaany , @mgrabban )


Complete the following tasks before sending your PR, and replace `[ ]`
with

- Hardware Type: <BLANK>
- [ ] run `make test` to ensure correctness
- [ ] run `make checkstyle` to ensure code style
- [ ] run `make test-convergence` to ensure convergence


cc @ByronHsu , @lancerts 
Linked with #396
  • Loading branch information
abhilash1910 authored Dec 9, 2024
1 parent 515b491 commit d58510f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/liger_kernel/env_report.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def print_env_report():
cuda_version = (
torch.version.cuda if torch.cuda.is_available() else "Not available"
)
print(f"CUDA version: {cuda_version}")
print(f"CUDA version: {cuda_version}")
except ImportError:
print("PyTorch: Not installed")
print("CUDA version: Unable to query")
Expand All @@ -42,6 +42,15 @@ def print_env_report():
print(f"Transformers version: {transformers.__version__}")
except ImportError:
print("Transformers: Not installed")

try:
xpu_version = (
torch.version.xpu if torch.xpu.is_available() else "XPU Not Available"
)
print(f"XPU version: {xpu_version}")
except ImportError:
print("XPU version: Unable to query")



if __name__ == "__main__":
Expand Down

0 comments on commit d58510f

Please sign in to comment.