Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

barrett15_74: add workaround for MacOS bug #16

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/barrett15.cl
Original file line number Diff line number Diff line change
Expand Up @@ -1827,10 +1827,11 @@ ff = 1/f as float, needed in div_192_96().
a.d1 = SUB_COND(-tmp75.d1, a.d0 > 0);
a.d2 = SUB_COND(-tmp75.d2, a.d1 > 0x7FFF);
a.d3 = SUB_COND(-tmp75.d3, a.d2 > 0x7FFF);
a.d4 = SUB_COND(mad24(bb.d5, 32768u, bb.d4) - tmp75.d4, a.d3 > 0x7FFF) & 0xFFFF; // keep one extra bit
a.d4 = SUB_COND(mad24(bb.d5, 32768u, bb.d4) - tmp75.d4, a.d3 > 0x7FFF);
a.d1 &= 0x7FFF;
a.d2 &= 0x7FFF;
a.d3 &= 0x7FFF;
a.d4 &= 0x1FFFF; // keep 2 extra bits

#if (TRACE_KERNEL > 3)
if (tid==TRACE_TID) printf((__constant char *)"cl_barrett15_74: b=%x:%x:%x:%x:%x - tmp = %x:%x:%x:%x:%x (a)\n",
Expand Down
9 changes: 5 additions & 4 deletions src/mfakto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -645,10 +645,11 @@ void set_gpu_type()
{
mystuff.gpu_type = GPU_GCN3; // these cards have improved int32 performance over the previous GCNs, making for a changed kernel selection
}
else if (strstr(deviceinfo.d_name, "Ellesmere") || // RX 470/480/570/580/590
strstr(deviceinfo.d_name, "gfx804") || // RX 550
strstr(deviceinfo.d_name, "Lexa") || // small GCN 4.0 - not tested, only assumption
strstr(deviceinfo.d_name, "Baffin") // small GCN 4.0 - not tested, only assumption
else if (strstr(deviceinfo.d_name, "Ellesmere") || // RX 470/480/570/580/590
strstr(deviceinfo.d_name, "gfx804") || // RX 550
strstr(deviceinfo.d_name, "Radeon Pro 560") || // Baffin, used on Macs
strstr(deviceinfo.d_name, "Lexa") || // small GCN 4.0 - not tested, only assumption
strstr(deviceinfo.d_name, "Baffin") // small GCN 4.0 - not tested, only assumption
)
{
mystuff.gpu_type = GPU_GCN4;
Expand Down