sahancpal commited on
Commit
b3bf70d
·
verified ·
1 Parent(s): 570922f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +97 -3
README.md CHANGED
@@ -1,3 +1,97 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Permissive Triton Dataset
2
+
3
+ A curated dataset of Triton code snippets from GitHub repositories, filtered to include only those with permissive licenses.
4
+
5
+ ## Dataset Description
6
+
7
+ This dataset contains code snippets from Triton-based projects across GitHub, specifically filtered to include only repositories with permissive licenses (MIT, Apache, BSD, etc.). Each entry in the dataset includes:
8
+
9
+ - Triton code snippet
10
+ - Repository information
11
+ - File path
12
+ - Commit hash
13
+ - Direct GitHub URL to the source code
14
+ - License information
15
+ - Categorization of the code functionality
16
+
17
+ ## Dataset Creation
18
+
19
+ The dataset was created by:
20
+
21
+ 1. Collecting Triton code snippets from public GitHub repositories
22
+ 2. Categorizing the code snippets based on functionality (Using claude)
23
+ 3. Filtering to keep only snippets from repositories with permissive licenses using a custom `should_keep_license` function
24
+
25
+ ## License Information
26
+
27
+ This dataset is released under the MIT License. However, each code snippet in the dataset comes from a repository with its own specific license (all permissive). The license type for each snippet is included in the dataset.
28
+
29
+ Permissive licenses included in this dataset:
30
+ - MIT
31
+ - Apache 2.0
32
+ - BSD 2-Clause and 3-Clause
33
+ - ISC
34
+ - CC0 1.0
35
+ - CC BY-4.0
36
+ - And other permissive licenses
37
+
38
+ ## Format and Usage
39
+
40
+ The dataset is provided in two formats:
41
+ - JSON format (`permissive_triton_dataset.json`)
42
+ - Parquet format (`permissive_triton_dataset.parquet`)
43
+
44
+ ### Sample Data Structure
45
+
46
+ ```json
47
+ {
48
+ "uuid": "...",
49
+ "file_name": "example_triton_file.py",
50
+ "repo_name": "username/repo",
51
+ "file_path": "path/to/file.py",
52
+ "commit_hash": "abcdef123456",
53
+ "starcount": 42,
54
+ "input": "@triton.jit\ndef example_kernel(...):\n ...",
55
+ "category": {
56
+ "Functionality": ["Category1", "Category2"]
57
+ },
58
+ "licenses": ["MIT"],
59
+ "github_url": "https://github.com/username/repo/blob/abcdef123456/path/to/file.py"
60
+ }
61
+ ```
62
+
63
+ ### Field Descriptions
64
+
65
+ | Field | Description |
66
+ |-------|-------------|
67
+ | `uuid` | Unique identifier for the entry in the dataset |
68
+ | `file_name` | Name of the source code file |
69
+ | `repo_name` | GitHub repository name in format "username/repo" |
70
+ | `file_path` | Path to the file within the repository |
71
+ | `commit_hash` | Git commit hash for the specific version of the file |
72
+ | `starcount` | Number of stars the repository had at the time of data collection |
73
+ | `input` | The actual Triton code snippet |
74
+ | `category` | Categorization of the code functionality (labeled using Claude) |
75
+ | `licenses` | List of permissive license types applicable to this code |
76
+ | `github_url` | Direct URL to view the file on GitHub at the specific commit |
77
+
78
+ #### Category Types
79
+
80
+ We consider categories in the following domains: Functionality, Data Type, Performance Objective, Parallelization Strategy, and Memory Access Pattern.
81
+ We optinally add labels to each of these domains per entry to try and describe the data (using claude).
82
+
83
+ ### Loading the Dataset
84
+
85
+ ```python
86
+ # Using JSON
87
+ import json
88
+ with open('permissive_triton_dataset.json', 'r') as f:
89
+ dataset = json.load(f)
90
+
91
+ # Using Parquet
92
+ import pandas as pd
93
+ df = pd.read_parquet('permissive_triton_dataset.parquet')
94
+ ```
95
+ ---
96
+ license: mit
97
+ ---