liger-kernel-nightly 0.4.2.dev20241119054537__py3-none-any.whl → 0.4.2.dev20241119054729__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -264,7 +264,11 @@ def rms_norm_backward(
264
264
  dY = dY.view(-1, dim)
265
265
  n_rows, n_cols = dY.shape
266
266
 
267
- sm_count = torch.cuda.get_device_properties(X.device).multi_processor_count
267
+ if X.device.type == "cuda":
268
+ sm_count = torch.cuda.get_device_properties(X.device).multi_processor_count
269
+ elif X.device.type == "xpu":
270
+ sm_count = torch.xpu.get_device_properties(X.device).gpu_subslice_count
271
+
268
272
  # fp32 for numerical stability especially.
269
273
  _dW = torch.empty((sm_count, n_cols), dtype=torch.float32, device=W.device)
270
274
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: liger_kernel_nightly
3
- Version: 0.4.2.dev20241119054537
3
+ Version: 0.4.2.dev20241119054729
4
4
  Summary: Efficient Triton kernels for LLM Training
5
5
  License: BSD 2-CLAUSE LICENSE
6
6
  Copyright 2024 LinkedIn Corporation
@@ -14,7 +14,7 @@ liger_kernel/ops/jsd.py,sha256=anWfdioucxZy4JQfTvbHBR-IQrZKeH-gBF1MHwwTuTQ,5781
14
14
  liger_kernel/ops/kl_div.py,sha256=03FNXfvCb6M-56hhFepAFV9p6brArPR6KOKkdGD34mw,8374
15
15
  liger_kernel/ops/layer_norm.py,sha256=unGMYMOPqtkM9aTrokhcqgPmsV2AUN7Yzv86isVB9OI,7422
16
16
  liger_kernel/ops/qwen2vl_mrope.py,sha256=xZvQnhkSTjU-k6KiiRn9e0SYO1ESs1jmuZFMICduLpc,8552
17
- liger_kernel/ops/rms_norm.py,sha256=LAxCiFjpBbb7TDh9pOzsVmDGAR7eEbTDnEhjSd6TX_M,11583
17
+ liger_kernel/ops/rms_norm.py,sha256=GKs49wXmUngY7MJ5QDQxTp4P2HDVqzZBaCr0pGtyZyM,11733
18
18
  liger_kernel/ops/rope.py,sha256=jrzaA9-6Orn44y_IIam9_YNPQxOFK2FrIRNfFea4EtU,8513
19
19
  liger_kernel/ops/swiglu.py,sha256=Fwxtd76rhHKT9ShQAGca9RsnASplAVxtYKHmiT73_yA,2994
20
20
  liger_kernel/ops/utils.py,sha256=3JSF--O7KT5Wa5BuO70M4h0XetxoZ_e9IoW9GRlxlBg,3777
@@ -50,9 +50,9 @@ liger_kernel/transformers/model/qwen2.py,sha256=EyhSSzQOskGjSnCsKMZpd1s5IAIlHd5P
50
50
  liger_kernel/transformers/model/qwen2_vl.py,sha256=bIQe2bWiY--G84FhCD29Gdi64_qHP6vbcGsK6vKysQE,8547
51
51
  liger_kernel/triton/__init__.py,sha256=yfRe0zMb47QnqjecZWG7LnanfCTzeku7SgWRAwNVmzU,101
52
52
  liger_kernel/triton/monkey_patch.py,sha256=5BcGKTtdqeYchypBIBopGIWPx1-cFALz7sOKoEsqXJ0,1584
53
- liger_kernel_nightly-0.4.2.dev20241119054537.dist-info/LICENSE,sha256=OhzLDHJ0to4a8sodVLELZiCFylZ1NAAYLs-HrjPy0ag,1312
54
- liger_kernel_nightly-0.4.2.dev20241119054537.dist-info/METADATA,sha256=BoWJXhq2CldcpNJomRA4lKZ4J2AEr9tVfrjGyxq3EdM,21556
55
- liger_kernel_nightly-0.4.2.dev20241119054537.dist-info/NOTICE,sha256=njwnoPZLh9AN8SJQzxvCGLHi-8X__AvWRze6joNXIY8,2066
56
- liger_kernel_nightly-0.4.2.dev20241119054537.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
57
- liger_kernel_nightly-0.4.2.dev20241119054537.dist-info/top_level.txt,sha256=2eghu4hA3LnkM7ElW92tQ8zegWKgSbeo-k-aGe1YnvY,13
58
- liger_kernel_nightly-0.4.2.dev20241119054537.dist-info/RECORD,,
53
+ liger_kernel_nightly-0.4.2.dev20241119054729.dist-info/LICENSE,sha256=OhzLDHJ0to4a8sodVLELZiCFylZ1NAAYLs-HrjPy0ag,1312
54
+ liger_kernel_nightly-0.4.2.dev20241119054729.dist-info/METADATA,sha256=z7a8F_CpxQybJzgLVPeWKTiLuv4nWL7gvQe4vIVzn7Q,21556
55
+ liger_kernel_nightly-0.4.2.dev20241119054729.dist-info/NOTICE,sha256=njwnoPZLh9AN8SJQzxvCGLHi-8X__AvWRze6joNXIY8,2066
56
+ liger_kernel_nightly-0.4.2.dev20241119054729.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
57
+ liger_kernel_nightly-0.4.2.dev20241119054729.dist-info/top_level.txt,sha256=2eghu4hA3LnkM7ElW92tQ8zegWKgSbeo-k-aGe1YnvY,13
58
+ liger_kernel_nightly-0.4.2.dev20241119054729.dist-info/RECORD,,