Skip to content

Commit

Permalink
Merge pull request #514 from ngc92/compile-fix
Browse files Browse the repository at this point in the history
fix compilation with older nvcc
  • Loading branch information
karpathy authored Jun 2, 2024
2 parents ff98d8b + a902323 commit cb5eff0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions train_gpt2.cu
Original file line number Diff line number Diff line change
Expand Up @@ -228,10 +228,10 @@ struct alignas(16) Packed128 {
return result;
}
__device__ static Packed128 zeros() {
return constant(0);
return constant(0.f);
}
__device__ static Packed128 ones() {
return constant(1);
return constant(1.f);
}

__device__ ElementType& operator[](int index) {
Expand Down

0 comments on commit cb5eff0

Please sign in to comment.